Hi Alan,
For various reasons it is awkward for all Judy allocations to come out of
the global heap managed by malloc/free. We want to manage separate pools
(heaps) and be able to specify for each Judy array which pool should be used
for all memory allocs/frees done by the array.
I agree that malloc/free has excellent performance and that it was a good
choice to have Judy use malloc as opposed to some other memory allocator
using a single heap. It is only because we want multiple pools that we want
something other than malloc.
We're prepared to sacrifice a bit of performance due to the increase in
complexity. Even if the underlying pool allocator is as good as malloc/free,
there will be a small performance cost because a reference to the allocator
will have to be stored in the root record for a Judy array and then passed
down as a function argument in the various operations that traverse the
internal tree/trie data structures. We believe the benefits will outweigh
the cost.
Jim
On Mon, Dec 20, 2010 at 12:35 PM, Alan Silverstein <[email protected]> wrote:
> Jim et al,
>
> > I see that Judy has implemented bottleneck functions in
> > src/JudyCommon/ in the files JudyMalloc.c and JudyMallocIF.c. It
> > appears that primary intent of of this implementation is for debugging
> > and statistics. Has any thought been put into extending Judy's
> > control over memory allocation so that each Judy array (or set) could
> > be attached to a memory pool?
>
> Actually we put a LOT of development time into libJudy having its own
> memory allocator (directly calling sbrk(), etc). We studied the issue
> deeply. As you might know, malloc() and free() are about the only
> external requirements used by libJudy -- maybe one more, I forget what
> it was.
>
> Doug decided that there was no gain in having our own memory allocator,
> compared to a quality implementation of malloc(). It's been eight years
> and I'm having trouble recalling the public domain version he found and
> liked best. Doug Lea Malloc maybe?
>
> As for memory pools -- not sure what you mean. I haven't kept up. Are
> there modern malloc() libraries that offer some kind of namespace/pool
> feature? Does this buy you any performance?
>
> Cheers,
> Alan Silverstein
>
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel