Bug 7357 - kernel out of memory!!!
kernel out of memory!!!
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-11-26 14:34 EST by acount closed by user
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-06 00:54:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description acount closed by user 1999-11-26 14:34:10 EST
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 17:27:59 EST
Assigned to dledford
Comment 2 Bill Nottingham 2000-02-06 00:54:59 EST
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.