/** * BMEMheader * * Header structure for memory chunks. * * Returns - * A BMEMpool pointer */ typedef struct BMEMheader{ struct BMEMheader *next, *prev; /*linked list*/ int free; /*number of free elements in this chunk */ int index; /*chunk index*/ }BMEMheader; /** * BMEMpool * * Memory . * * Returns - * A BMEMpool pointer */ typedef struct BMEMpool{ struct Listbase chunks; /*Linked list of chunks. Should never be stepped through directly*/ int chunksize; /*In bytes, multiples of 8*/ int elemsize; /*In bytes, multiples of 8*/ int totchunks; /*Total number of chunks*/ struct BMEMheader *lookup /*Quick lookup table for chunks. Rebuilt whenever chunks listbase is modified.*/ }BMEMpool;