41 size_t align,
size_t new_size);
66#define PULP_WCLAP_PLUGIN(factory_fn) \
67 PULP_CLAP_PLUGIN(factory_fn) \
71 __attribute__((export_name("malloc"))) \
72 void* wclap_malloc(size_t size) { \
73 return ::malloc(size); \
75 __attribute__((export_name("free"))) \
76 void wclap_free(void* ptr) { \
79 __attribute__((export_name("cabi_realloc"))) \
80 void* cabi_realloc(void* ptr, size_t old_size, \
81 size_t, size_t new_size) { \
83 if (new_size == 0) { ::free(ptr); return nullptr; } \
84 return ::realloc(ptr, new_size); \