linux-2.4.0-test5 slowed down unusable with OOM

From: Andreas Jellinghaus (aj@dungeon.inka.de)
Date: Thu Aug 03 2000 - 06:11:37 EST


this simple c app will make 2.4.0-test5 such slow,
it's unusable. i saw some progress in the xterm running this app,
but it was not possible to do anything else (like ctr-alt-f1 or
ctrl-alt-del, mouse and keyboard strokes also had no effekt).
ping to the box worked still.

it might be nice to kill the app much sooner,
instead of swapping for hours.

regards, andreas

#include <malloc.h>
#include <stdio.h>

void main()
{
    int *mem;
    long int i;
    long int x;
    x=1;
    while (1) {
        x++;
        printf("%ld MB ... ",x);
        fflush(stdout);
            mem=malloc(1024*1024*x);
            for (i=0; i<x*1024*1024/sizeof(int); i=i+64)
            {
              mem[i]=0;

            }
            free(mem);
    }
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:10 EST