httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Galbavy <Peter.Galb...@knowledge.com>
Subject Re: [patch] smarter free block allocation to fix leak
Date Fri, 06 Aug 1999 08:36:16 GMT
On Thu, Aug 05, 1999 at 01:17:05PM -0700, Dean Gaudet wrote:
> The stats you showed make me think that if we solve the 8200 problem
> (which is probably the case I mentioned) then we have a completely flat
> profile -- and it makes sense to only keep blocks of size 8192 on our free
> list... everything else can go back via free()... and we push the entire
> issue of memory allocator design into libc -- where it's already solved. 

Not wanting to be a stick in the mud, but some of the malloc()s out
there are really bad. But in this case, as you point out, it should
not matter.

> The 4096/8192 numbers were chosen with almost no thought -- it's just that
> we need some numbers, but nobody has bothered to tune them much yet :) I'm
> thinking that we probably don't even want BLOCK_MINFREE at all -- we
> should just allocate at least 8192 (or maybe 16384), and the rest are
> actually individual mallocs.

I suggest (again with no real thought) that this number should be a
power-of-two multiple of the hardware page size. Now, can anyone come
up with a sure fire way, across architectures, to get the page size ?
(There are various #defines' and sysconf(_SC_PAGESIZE) ).

Regards,
-- 
Peter Galbavy
Knowledge Matters Ltd
http://www.knowledge.com/

Mime
View raw message