I was looking to have a linked list of 32 bit pointers. It seems that I then have to allocate 4-byte sturctures consisting of orxLINKLIST_NODE and my pointer, then add them at the end of the orxLINKLIST. I am not too hot on dynamically allocating such small chunks of memory, however. Does orxMemory_Allocate do anything to help with this?
Comments
It'll actually allocate memory chunks, make sure they're nicely aligned on cache-line size and do all the bookkeeping for you.
Slots are not actually freed/reallocated, simply re-used when available, for more efficiency.
All allocations are indexed and the index can be requested if need be.
orxBANK also use a high-watermark approach and will keep empty chunks/slots instead of de-allocating them.
If you want to return the memory, calling orxBank_Compact() should do the trick and will free any empty chunks.