httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@raleigh.ibm.com>
Subject Re: palloc without a pool (was Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix sockets.c)
Date Wed, 08 Sep 1999 11:03:47 GMT
> >   Allor ap_palloc to work without a pool.  Basically, this just uses malloc.
> >   This also sets us up to allow multiple allocation methods in the same program.
> 
> bleh. 
> 
> if you're going to use malloc like this, then just use malloc.  otherwise
> you're paying a conditional test on every call to palloc.  not to mention
> that there's no free() function... so you have to use free() eventually
> anyhow, which seems to destroy the abstraction.

Actually, I will be putting free in at some point.  I haven't gotten to it
yet.  Currently, I can't use malloc, because I am having APR do all of the
memory allocation.  That can change pretty easily, but that's they way it
works right now.  So, the choice becomes calling ap_palloc for any memory
allocation, using any technique, and letting ap_palloc figure out the
right way to do it, or having multiple memory allocation routines.  For
right now, ap_palloc does all allocation.  If we want that to change, it
can change after I finish what I am currently working on.

Ryan


_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	


Mime
View raw message