
26 Jun
2012
26 Jun
'12
5:27 p.m.
On Tue, Jun 26, 2012 at 11:42 AM, Nikolay Mladenov < nikolay.mladenov@gmail.com> wrote:
1) size_type is just a type, and it should be able to hold the eventual size of the biggest requested object
if size_type == boost::uint32_t you can request to allocate sizes of up to 2^32 - 1
size_type == size_t is probably ok for general use.
2) the first parameter in the pools constructor is the *chunk size*, which is the smallest amount of memory you can allocate and defines the granularity of your pool.
3) ordered_malloc(n) allows you to allocate a continuous array of n chunks. I think you have to free those with ordered_free.
Ah I see now, thank you for this explanation!