httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: worth fixing "read headers forever" issue?
Date Fri, 02 Jan 1998 22:12:32 GMT
Brian Behlendorf wrote:
> 
> At 01:22 PM 1/2/98 -0800, Dean Gaudet wrote:
> >When it malloc()s a block it increments a
> >scoreboard entry showing how much memory it has allocated.  The parent
> >prefers to kill off the child with the most memory allocated.  It's not at
> >all expensive actually. 
> 
> But will the parent check "often enough" to kill a child when it's reading
> an infinite number of headers, for example?  It won't kill a child reading
> a request anyways.  If we want a /general/ solution to the "reading input
> from a network" problem, that checking should also be done while input is
> being read.
> 

How expensive is doing a sbrk(0) ?

We could store that in the scoreboard and check it "every so often"
to see how much it's increased. The one advantage would be that
sbrk() would only be called when we really need to grab extra
memory so would be a better indication of a memory hog. Then again,
the bad point is we don't know how much malloc space has already
been used until the first sbrk is called :/

Just an idea, though I think some sort of malloc counter in
scoreboard might be cleaner...

-- 
====================================================================
      Jim Jagielski            |       jaguNET Access Services
     jim@jaguNET.com           |       http://www.jaguNET.com/
            "Look at me! I'm wearing a cardboard belt!"

Mime
View raw message