91#define MEMB(name, structure, num) \
92 static bool CC_CONCAT(name,_memb_used)[num]; \
93 static structure CC_CONCAT(name,_memb_mem)[num]; \
94 static struct memb name = {sizeof(structure), num, \
95 CC_CONCAT(name,_memb_used), \
96 (void *)CC_CONCAT(name,_memb_mem)}
Default definitions of C compiler quirk work-arounds.
int memb_free(struct memb *m, void *ptr)
Deallocate a memory block from a memory block previously declared with MEMB().
size_t memb_numfree(struct memb *m)
Count free memory blocks.
int memb_inmemb(struct memb *m, void *ptr)
Check if a given address is within a memory area previously declared with MEMB().
void * memb_alloc(struct memb *m)
Allocate a memory block from a block of memory declared with MEMB().
void memb_init(struct memb *m)
Initialize a memory block that was declared with MEMB().