Out of memory error in example
Compiled for Android using Readme, and getting:
crate context: Out of memory
When I try to run the mali_common_c_example on a Pixel 6 Pro 99% of the time.
Modifying lines 54-56 to:
int status = -1;
while (status < 0) {
status = hpc_gpu_mali_common_create_context(num_counters, counters,
&allocator, &context);
}
Has fixed it so it starts running now, but obviously this isn't a good solution.
EDIT:
Dug a little and it looks like line 130 of /lib/gpu/mali/context.c is failing to open the counter reader, which takes me to line 147 of the lib/gpu/mali/driver_ioctl.c file's hpc_gpu_mali_ioctl_open_counter_reader method.
Changing the buffer_count to 8 from 16 seems to have fixed the issue entirely.