The answer is really not so easy.
I have RedHat Linux 6.2 (with standard kernel, I suppose 2.1).
I tried such program in c++:


#include <alloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main() {
    void* v[1000];
        for (int i=0;i<1000;i++) {
            //printf("%i. %p; ",i,v[i]);
    printf("\n\nMemory allocated. Wait 20 s.\n");
        for (int i=0;i<1000;i++) {
            //printf("%i. ^; ",i,v[i]);
    printf("\nMemory freed. Wait 20 s.\n");


Then I examine it with 'top' command (then shift-M to sort by memory

In first 20 seconds process 'mall' is on the top with 13M, then
in next 20 s it is NOT.

And here is the basic difference between 'mall' and 'httpd' processes: the
last are on the top ALL THE TIME.

So ?

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to