90#define MEMB(name, structure, num) \
91 static bool CC_CONCAT(name,_memb_used)[num]; \
92 static structure CC_CONCAT(name,_memb_mem)[num]; \
93 static struct memb name = {sizeof(structure), num, \
94 CC_CONCAT(name,_memb_used), \
95 (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().
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().
int memb_numfree(struct memb *m)
Count free memory blocks.