[Lemon-user] Custom allocators
Andrew Cunningham
lemon at a-cunningham.com
Wed Jun 29 18:03:58 CEST 2011
In my case, which is admittedly very specific, I am using the ObjecStore C++
OO database. It uses a persistent new to allocate objects in the database,
so requires a custom allocator be passed to any STL vectors/lists.
I have another suggestion , which comes from LEDA. When an node ( for
example) is deleted from the graph Lemon notifies the observers ( such as
the maps) after the arcs have been deleted, but before the node is deleted
from the graph. Is is useful to be notified both pre AND post deletion of a
graph object.
On Wed, Jun 29, 2011 at 4:14 AM, Alpár Jüttner <alpar at cs.elte.hu> wrote:
> Hi,
>
> > A suggestion. It would be very useful to be able to pass/define custom
> > STL allocators for the underlying STL types used (vector etc)
>
> Technically, it would be of course possible, but it would make the
> interfaces more complex (one more template parameter and one more
> constructor parameter).
>
> On the other hand, the tools in LEMON designed in a way that memory
> allocation shouldn't be a bottleneck in most use-cases. I.e. complex
> data structures are hand-optimized to allocate big chunks of memory
> blocks instead of depending on the speed (and caching efficiency) of a
> general purpose memory pool.
>
> But, if you know a real use case for using custom STL allocator in
> LEMON, don't hesitate to let us know.
>
> Regards,
> Alpár
>
> P.S.: Thank you for the kind words in your previous mail.
>
>
>
> > _______________________________________________
> > Lemon-user mailing list
> > Lemon-user at lemon.cs.elte.hu
> > http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20110629/0f88b46e/attachment.html>
More information about the Lemon-user
mailing list