httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: Too soon for 1.2 commits ??
Date Thu, 11 Jul 1996 22:05:18 GMT
Michael Douglass wrote:
> 
> On Thu, 11 Jul 1996, Ben Laurie wrote:
> 
> > If asked, I would vote for a possibly less efficient implementation which
> > didn't need to mess with memory.
> 
> Is this because of the concepts in our minds about the "efficiency" of dealing
> with memory?  I know you're probably all going to kick me out of here for
> beating a dead horse, but that's an inconsistant statement if you're talking
> about dealing with memory in such a way.

No, you are right. The whole question of memory allocation overhead is much
misunderstood, and it is certainly not correct to condemn it out of hand. In
fact, Apache's memory management model should avoid the main ailments that
cause inefficient memory allocation, particularly fragmentation. So, it is
possible that your approach may be better, despite the need for allocation.

> 
> As for grabing memory and holding it (and reallocing if you need more), think
> about how ugly that would be once the core apache starts to move to multi-
> threading.  Static buffers in a multi-threaded application would seem to
> me to be something that I would want to take every chance to avoid.

Hmmm ... we are talking about non-preemptive multithreading, so, in fact, such
buffers would be safe. However, the core point is that any implementation that
doesn't somehow limit its memory consumption is not acceptable, to me, anyway.

> 
> Oh, and as for "taking the time to benchmark"...  I'm interested now in
> finding out just what the results of the two operations in question would
> really be; that's why I'm going to do it.  Not to prove me right or wrong,
> but plain and simple curiosity has bitten me in the butt...

For the test to be realistic you have to benchmark in a running Apache, I
guess. Have fun!

Cheers,

Ben.

> 
> Michael Douglass
> Texas Networking, Inc.
> 
>   "To be a saint is to be an exception; to be a true man is the rule.
>    Err, fail, sin if you must, but be upright.  To sin as little as
>    possible is the law for men; to sin not at all is a dream for angels."
> 
>               - Victor Hugo, "Les Miserables"
> 

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.

Mime
View raw message