I am currently trying to allocate separate chunks of memory using malloc
in order not to allocate a huge amount of contiguous block of memory at one go but by allocating separate memory allocations. Having said that, in order to keep track of the allocated memory I am trying to keep each pointer in a dynamic array to hold each reference to the memory allocated. Is this the best approach for handling large memory allocations or there is a better how this can be handled?