Is there features/containers of standard C++ or the STL which will
assist in minimizing memmory fragmentation upon creation of a huge
ammount of objects on the heap?
Currently my application allocates 50.000 objects using "new". I can
store the pointers to those objects in a container/collection class and
indeed this assists in processing (sort, delete etc.) but is there any
way for me to make my "new"'ed object resist in some previously
allocated memmory chunk to improve performance (allocate in bigger
chunks) and avoid memmory fragmentation at the same time?
Just one example of the inefficiency is when I delete my objects, I have
to loop through all and "delete" instead of simply delete in one big
chunk. Obviously I can not use "delete[]" as this would only delete my
array and leave me with a massive memmory leak.
And pointers greatly appreciated!
/Casper