httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Fear <>
Subject memory questions about subpools
Date Tue, 09 Jul 1996 01:14:12 GMT
Hey all,

Following rst and rasmus's suggestion of using subpools for short-lived
memory management, I was rooting around in alloc.c and had the following

As I understand it, the following code in alloc.c (make_sub_pool, 268-270)
will call new_block to allocate memory.

  blok = new_block (0);
  new_pool = (pool *)blok->h.first_avail;
  blok->h.first_avail += POOL_HDR_BYTES;

new_block(0) in turn calls malloc_block.  malloc_block can return NULL if
no space is available.  Since address is dereferenced, this produces a
sigsegv, right?

The general question is more stylistic.  Clearly systems that run out
of space are generally in trouble.  Having the httpd die is not necessarily
the wrong thing.  But, most of the code I've seen elsewhere is good about
checking these things.  So, should I submit a patch or just leave it

(Yes, I know that I'm paranoid.  I've just debugged too many memory
glitches over the years, so I check for these things.)

BTW, I've also found what appears to be a memory leak in the Linux
regex library.  I'm the guy who did the extended SSI stuff which uses
regex.  My httpd leaks memory when I use the system regex, but not if
I use the Spensor regex.  This is some variant of the 1.5 libc, but
the .so file seems to have been removed the last time the system was
built:-(  Just thought that there might be some out there interested.

Howard Fear      email1:

View raw message