memory pooling

B

bob

Hi,

can anybody tell me whats the most widely used/trusted/tested and free
memory pooling solution out there? I'd like to download it and possibly
introduce it into our application (problems with too much time spent
new'ing and delete'ing).

thanks

G
 
N

Noah Roberts

Hi,

can anybody tell me whats the most widely used/trusted/tested and free
memory pooling solution out there? I'd like to download it and possibly
introduce it into our application (problems with too much time spent
new'ing and delete'ing).

The most common and trusted are objects that implement the RAII idiom,
like boost::shared_ptr.

Other options include an actual memory pool in boost that I believe
works similarly to NextStep's NSAutoreleasePool.

I prefer RAII though I can see when the pool method might be more
appropriate.
 
V

Victor Bazarov

can anybody tell me whats the most widely used/trusted/tested and free
memory pooling solution out there? I'd like to download it and
possibly introduce it into our application (problems with too much
time spent new'ing and delete'ing).

Search for "SmartHeap". I don't know what "the most widely used..."
solution is, but SmartHeap is decent.

V
 
W

wkaras

mlimber said:

This looks like a good option if your app allocates fixed sized blocks.

If you truly need to replace void * operator ::new(size_t), you
could use:

http://www.geocities.com/wkaras/heapmm/heapmm.html

This allocator is design to have reasonable performance in
all situations, rather than optimal performance in some
typical case. If multiple threads are going to allocate from
the same heap, you'll need a mutex to protect the heap.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top