memory management - How to create pool allocator for abstract base class in C++? -


have run bug glibc's malloc(): http://sourceware.org/bugzilla/show_bug.cgi?id=4349 , thinking work around until updating later version of glibc pooled allocation small objects have many instances coming , going.

the small objects derived abstract base class. i'd find pattern (using boost ok) provide pool allocation automatically in base class , have work many derived classes.

would done defining operator new() in abstract base class? how organize having different pools each derived class have different actual memory size?

one obvious starting point boost pool library. unfortunately, model want 1 doesn't provide yet, although listed sole item under "future directions". otoh, library hasn't been updated in while now. chances of being updated include model seems remote (at least me).


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -