A
aaaaa
Hi all,
Does anybody know if STLPort or SGI STL standard allocators do memory
pooling for the list, map and set?
Also I have had a look at the BOOST pool_alloc (to be used as a pooling
allocator for lists), but looking into the code it doesn't seem to ever
release (to the global ::free) the memory that was once allocated.
I can understand that such memory can be re-used if I have another list
of the same object types later in the program, but it seems to me that
such pool_alloc should anyway release blocks which happen to be
completely free (*) otherwise the program will always appear to have the
peak memory allocation to the operating system. Like leaking! Doesn't it
really ever free the blocks, or it's my overlook?
(*) there are likely to be many totally free blocks after you finish
working with a bunch of pooled lists, if the implementation is what it
seemed to me: every new alloc call always returns the first free slot:
it's an autodefragmenting algorithm
Does anybody know if STLPort or SGI STL standard allocators do memory
pooling for the list, map and set?
Also I have had a look at the BOOST pool_alloc (to be used as a pooling
allocator for lists), but looking into the code it doesn't seem to ever
release (to the global ::free) the memory that was once allocated.
I can understand that such memory can be re-used if I have another list
of the same object types later in the program, but it seems to me that
such pool_alloc should anyway release blocks which happen to be
completely free (*) otherwise the program will always appear to have the
peak memory allocation to the operating system. Like leaking! Doesn't it
really ever free the blocks, or it's my overlook?
(*) there are likely to be many totally free blocks after you finish
working with a bunch of pooled lists, if the implementation is what it
seemed to me: every new alloc call always returns the first free slot:
it's an autodefragmenting algorithm