Bug 7357

Summary: kernel out of memory!!!
Product: [Retired] Red Hat Linux Reporter: acount closed by user <a1459440>
Component: kernelAssignee: Michael K. Johnson <johnsonm>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1Keywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-06 05:54:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.