#ifndef __ALLOCATOR_H #define __ALLOCATOR_H struct allocator { void *(*alloc)(size_t num, size_t size); void *(*realloc)(void *ptr, size_t num, size_t size); void (*free)(void *ptr); }; /* default allocator */ extern const struct allocator defalloc; #endif