Messages in this thread | | | Date | Fri, 18 Feb 2000 12:01:20 +0800 | From | solar <> | Subject | mem 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; }
| |