httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: alloc.c
Date Thu, 27 Jun 1996 15:43:21 GMT
  Ok, I see palloc(), but no pfree().  in trying to follow this code I'm just
  wondering if you freely allow palloc()s during the processing of a request
  and then you clean up the memory at the end of the request?

Correct.  For cases where a *lot* of scratch strings are required, 
you can create a sub_pool, do palloc()s within it, and then clear the
entire pool at will.  It that's not flexible enough, malloc() is still
there for people who want it, but it can be difficult to use without
creating space leaks (which is why the pool system exists in the first


View raw message