Reduces memory usage, with new array growing by fixed size and not exponential.

This commit is contained in:
Andrea Mazzoleni 2013-09-28 09:40:08 +02:00
parent 7f02cd068f
commit d525b4a14a
18 changed files with 497 additions and 53 deletions

View file

@ -26,17 +26,12 @@
*/
/** \file
* Dynamic array.
* Dynamic array based on segments of exponential growing size.
*
* This array is able to grow dynamically upon request.
*
* This is very similar at ::tommy_array, but it allows to store elements of any
* size and not just pointers.
*
* The resize involve an allocation of a new array segment, without reallocating
* the already allocated memory, and then not increasing the heap fragmentation.
*
* This means that the address of the allocated segments never change.
*/
#ifndef __TOMMYARRAYOF_H