lkml.org 
[lkml]   [2000]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectmem management problem?
in kernel 2.2.15pre7, when declare a object larger than phisical mem, a
core dump will occure.
while on solaris 7, i can declare a object as large as 3x phisical mem
size. the SW &HW:

machine 1: ultra sparc + sun solaris 7 + 128M + 128M swap
machine 2: intel PII + 64M + 70M swap

i use the same test program (attashed) on each machine.
#include <stdio.h>
#include <string.h>

#define PHS_MEM (unsigned)(1<<26) /* 64M phisical memory */

/*
* Modify these lines for tests...
*/
#define BUFSIZE PHS_MEM
#define NEWSIZE PHS_MEM/64

char buf[BUFSIZE];

int main(int argc,char** argv)
{
int i;
char* p;
p=(char*)malloc(NEWSIZE);
if(!p){
perror("malloc");
exit(-1);
}
printf("%uM memory allocated at: %p\n",NEWSIZE>>20,p);
return 0;
}
\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.023 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site