The system call that gives you memory, brk . The usual functions malloc and calloc , realloc simply use the space specified by brk . If this space is not enough, another brk is created to create a new space. Typically, space increases in the size of the virtual memory page.
Thus, if you really want to have a ready-made pool of objects, then do not forget to allocate memory several times. For example, you can create one 4KB pool. 8KB , ... space.
Next idea, look at your objects. Some of them have one size, some have a different size. It will be a big pain to process distributions for all of them from one pool. Create pools for objects of different sizes (2 degrees are best) and select them. For example, if you had a 34B object, you would allocate space for it from the 64B pool.
Finally, the remaining space can either be left unused or moved to other pools. In the above example, you have 30B on the left. You would split it into 16B , 8B , 4B and 2B pieces and add each piece to your pool.
Therefore, you should use linked lists to manage the predefined space. This means that your application will use more memory than it actually is, but if it really helps you, why not?
Basically, what I described is a combination between a buddy distributor and a slab allocator from the Linux kernel.
Change After reading your comments, it will be quite easy to allocate a large area using malloc(BIG_SPACE) and use it as a pool for your memory.