httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mladen Turk" <>
Subject RE: [PATCH] Mkae Apache Monitor Display Windows XP correctly
Date Thu, 09 Aug 2001 10:18:29 GMT
> Guys...
>   with only 3 recognized apache services (more on that in a
> minute) ... it consumes
> a working set of 1.8 MB (!!!) we need to rip out a bit of this
> cruft.  K.I.S.S!

On my WIN2K box for 64 services it conumes 1.6MB

>   The about box is a waste (in most programs), but _especially_
> in a task bar
> application reporting the Windows OS (and all the dead-weight to
> go along with it.)
> A "What's This?" tooltip box is more than sufficient, no?  Only
> my touchpad has a real
> "About..." box, and it wastes no effort on reporting the Windows
> version :)

I agree that About box is not essentilal for program functionality, without
it the memory consumption is 100K lesser.

>   If they don't know which windows they are using, oh well.
>   I'll offer a patch Monday if nobody beats me to it.  (I'm
> following these
> discussions off-line).  I will also hook in apr.lib (static, not
> dynamic) for
> nothing more than table and pool create/destruct...
>   Pools should make this app very memory-lite, since each
> iteratation can gain a
> sub pool that is then destroyed cleanly (without the leaking resources).
> Using a table or hash to track the installed/running services
> (when there are
> many) will also be a nice improvement.

I disagree with that, if you only wish to use the apr for maintaining a
service list. It a only a simple list so why using hash tables or something
like that (brute force will beat any hash table for small number of items).
I've created a static struct with 3 char pointers and a DWORD times 128 (for
a reasonable number of services). I agree that when you are using only a 3
services you have a overhead of 7296 bytes of static memory, but do you
think that introducing apr would fit into that memory frame?
Other thing is if you want to use the dynamic memory allocation for cases
when there are more than 128(?????) services installed on one box, but still
why using apr for that? Its only a simple linked list after all.

>   TARGET:  500kb working set, or less!  Possible?  Don't know yet.

Simple WinMain eats around 300K.
I'm also very sceptic about Task manager (if that's what are you using for a
mem usage). For Example the previous program (winapi.c) in the attachment,
report 848K of memory when compiled with VC and 856 with BCC. First time
when the program is minimized it reports the 92K/100K of mem usage, and when
restored again aroun 270K. (Very strange). Next time you minimize the window
it reports 88/96K of mem usage.

> Bill
> [I've renamed each generation of Apache.exe by number, since all
> 7 versions I track are
> running on different ports.  Apache1.3.14.exe means more when I
> look at the process list
> than seeing 30 Apache's.  Of course, that breaks the association
> for the task bar app,
> as well.  I'll try working up some cute fix for this quandry next
> week, because I'd sure
> like to fold all 10 of my servers under this controller :)]

That is something that make sense.

I offer a patch that has a removed About box and tests the ImagePath
Registry key for \apache, .exe, and --ntservice or -k runsevice. This gives
you an option to have for an example a apachexxxxxxxxx.exe as a exe name.

I'm not very familiar with a diff ( I've used a: diff -u


View raw message