[pool] Doubling algorithm

View: New views
2 Messages — Rating Filter:   Alert me  

[pool] Doubling algorithm

by Martin_Scheffler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just stumbled across an old problem:
The maximum size of new allocations cannot be limited in boost::pool.
I have a pool that grows to hundreds of megabytes. The pool doubles its
allocation size every time it runs out of free space. Because Windows wants
to allocate consecutive free space, I get out of memory errors even when my
program only uses ~500 mb of main memory. If I could limit the amount of
memory to allocate this would not be a problem.

This was already discussed here:
http://lists.boost.org/Archives/boost/2008/10/143763.php

Has anything happened since then? Is boost::pool currently maintained? Or
are there alternative memory pool libraries I could use?
Thank you!

Martin Scheffler
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [pool] Doubling algorithm

by Jonathan Franklin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jul 7, 2009 at 12:15 AM, Martin
Scheffler<martinscheffler@...> wrote:
> The pool doubles its
> allocation size every time it runs out of free space.

I have solved this in the past by writing a simple wrapper class that
caps the max pool size.  I also made it not double at one point, but
found that the doubling scheme worked "better."

AFAIK, there is no maintainer.  However, someone volunteered a few
months back to make some long-needed fixes.  Not sure what ever became
of that.

Jon
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost