Bug 7357 - kernel out of memory!!!
Summary: kernel out of memory!!!
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-11-26 19:34 UTC by acount closed by user
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-02-06 05:54:45 UTC


Attachments (Terms of Use)

Description acount closed by user 1999-11-26 19:34:10 UTC
run this like a user, not root

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

main()
{
        void *buf[2048];
        long int mem = 0x3000000;
        int i = 0;

        for(;;){
                printf("%lX\n", mem);
                buf[i] = malloc(mem);
                if (buf[i] == NULL)
                  mem /= 2;
                else{
                        memset(buf[i], i, mem);
                        i++;
                }
                if(mem < 1){
                        sleep(1);
                        mem = 0x20000;
                }
        }
        getchar();
}

Comment 1 Cristian Gafton 2000-01-04 22:27:59 UTC
Assigned to dledford

Comment 2 Bill Nottingham 2000-02-06 05:54:59 UTC
Set resource limits for your users; this is normal behavior.


Note You need to log in before you can comment on or make changes to this bug.