httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: mallocs in child processes
Date Tue, 14 Mar 1995 16:33:54 GMT
FWIW, the content-arb code preallocates space to store a certain
number of Accept: headers for clients, and goes to the well (malloc())
if a client submits more.  The way things are set up now, there is a
function which is intended to be called to reset for the next
transaction.  However, that function arranges to reuse the allocated
memory, rather than free it outright.

So, if the server is set up for 40 Accept:s, the current base case,
and a client subsequently submits, say 50, the server will allocate
space for 80 --- it doubles --- and use all that space for subsequent
requests.  This means that multiple connections from a given piggy
client will only cause malloc() to be called once.


View raw message