Zitat von Marc Weustink <[EMAIL PROTECTED]>: > Marco van de Voort wrote: > >> Marco van de Voort wrote: > >>>> Inoussa OUEDRAOGO wrote: > >>>>> - TAVLManagedTree that uses a node mem manager provided in the > constructor. > >>>>> The developer using this one is _aware_ of the thread safety issue > and can > >>>>> then provide a thread safe node mem manager for an instance exposed > >>>> What is exactly the add-on value for the node mem manager? > >>> I can only think of heap fragmentation and reduction of creation > overhead. > >> Yes, but fpc's memory manager also already does this (at least if the > >> allocation size is less than 512 bytes or so). > > > > But fpc's memory manager won't be always used. There is cmem, and a future > > sharemem as options too. And sharemem-likes are known to be slow. > > > > The "memmanager might also do this" might be a reason to not enable it by > > default, but not a reason to eliminate the possibility all together. > > I'm pro having a manged and an unmanaged avltree. One (big) disadvantage > of the current implementation (with a shared node manager for all trees) > is that you cannot add custom derived treenodes since they will be > released in the pool too.
I think too, that we need a fast, lightweight tree and a slower, but customizable tree. Something like TFPList and TList. One without virtual methods and one with virtual methods and definable node class. Mattias _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel