5 Nov
2009
5 Nov
'09
6:48 p.m.
I actually did this at one time w/ the boost::pool by making my requested_size 1 byte, then doing an ordered_malloc(num_bytes).
I'm not claiming that this is a good or a bad idea. But it did work.
Heh. And I've written my own class-bicycle, allocating some fixed-size big chunks with boost::pool and then cutting needed blocks from them. But there are many stones and details, like memory aligning, or making object_pool from such pool. So, probably professionally-written solution will cover such problems.