You can use AllocMem from exec to allocate a block of memory and then use Allocate to allocate items from this block. At exit you do not need to free each allocated items, freeing whole memory block via FreeMem is enough.
This should work on any KS version, for KS 3.0 or higher you can use exec's memory pools.
|