When I attempt to use any zig allocator (smp, arena, etc…) in a library built for android, it causes a panic when using the allocator inside the android emulator. If I use the lib c allocator, no panic occurs.
Is this expected behavior for android platforms? Or could there be some information I am missing that might enable the zig allocators to work inside libraries built for android.
Although my library works fine with the c allocator, I get significant performance improvements by using the arena allocator, so it would be nice if there was a way to use the arena allocator on android.
I wonder if doing something like this makes sense, but in light of the fact even the smp allocator panics, I’m hesitant to try:
var arena = std.heap.ArenaAllocator.init(std.heap.c_allocator);
defer arena.deinit();
const allocator = arena.allocator();