csrc/zlsys_allocation.c
/* openzl-sys-rs: OpenZL's allocation layer, routed through the budget.
*
* This translation unit takes the place of the vendored
* openzl/src/openzl/common/allocation.c, which stays byte-for-byte upstream:
* it includes that file after renaming malloc, calloc and realloc, so
* ZL_malloc, ZL_calloc, ZL_realloc and the arenas' raw allocator charge the
* per-thread budget (zlsys_budget.c). <stdlib.h> is included first, so its
* declarations keep their real names and the include guard keeps them so.
* The rename also touches the Arena struct's member names inside this one
* translation unit; member names do not change the layout. */
#include <stdlib.h>
#include "zlsys_budget.h"
#define malloc zlsys_malloc
#define calloc zlsys_calloc
#define realloc zlsys_realloc
#include "openzl/common/allocation.c"