pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pooled version of hash?


From: Ben Pfaff
Subject: Re: Pooled version of hash?
Date: Sat, 14 Oct 2006 17:12:57 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

John Darrington <address@hidden> writes:

> Would it be a good idea to have a version of hash.c which uses a pool
> to do its memory allocation?

Yes, that's a good idea.  I'd suggest just adding a pool
parameter to the existing hash_create function, then changing the
*malloc and free calls to pool_* and pool_free calls.  Callers
who don't want a pool can just pass a null pointer, because
pool_*malloc and pool_free interpret a null pointer as a request
to just call malloc or free.
-- 
"Platonically Evil Monkey has been symbolically representing the darkest 
 fears of humanity since the dawn of literature and religion, and I think
 I speak for everyone when I give it a sidelong glance of uneasy recognition 
 this evening." --Scrymarch




reply via email to

[Prev in Thread] Current Thread [Next in Thread]