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
Yes, all memory allocations are defined with malloc, so just override malloc with your own call. Remember to revert the malloc redef at the end. This can be done on a per container basis, so it's pretty useful!
void* my_malloc(size_t size) { .... }
#define malloc my_malloc
#define P
#define T int
#include <vec.h>
#undef my_malloc
Would like to also have the ability to define a custom memory allocator as we do for free and copy functions.
The text was updated successfully, but these errors were encountered: