You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had some issues lately when I optimize the code with gcc -O2 or any level above 0, It gives me segfault at arena_da_append because of accessing the memory got from arena_alloc, the weird thing is that it first made it through 4 or more allocations
The text was updated successfully, but these errors were encountered:
@yhyadev It's hard to tell exactly what's happening, but based off of what you're describing it sounds like a memory alignment issue. I've experienced something similar when allocating large numbers of strings to a similar type of arena allocator.
Something you can try is getting the alignment of your type with _Alignof() and doing something like the following:
I stopped already working with C, and removed arena.h from the project as I didn't need it, It would be better for someone else that got a similar issue to try this solution
I had some issues lately when I optimize the code with gcc -O2 or any level above 0, It gives me segfault at arena_da_append because of accessing the memory got from arena_alloc, the weird thing is that it first made it through 4 or more allocations
The text was updated successfully, but these errors were encountered: