Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!rice!uw-beaver!fluke!ssc-vax!ian From: ian@ssc-vax.UUCP (Ian R. Searle) Newsgroups: comp.unix.ultrix Subject: Malloc Problems with DECstation 5000/200 Keywords: Malloc, RISC, Ultrix 4.1 Message-ID: <3853@ssc-bee.ssc-vax.UUCP> Date: 16 Apr 91 04:06:30 GMT Distribution: usa Organization: Boeing Aerospace & Electronics, Seattle WA Lines: 39 Has anybody out there been having malloc problems on a DECstation 5000/200? We have 32 Meg of RAM, and 150+ swap, output from pstat -s below: 157688k swap configured 21948k reserved virtual address space 20236k used (4640k text, 0k smem) 137452k free, 1224k wasted, 0k missing avail: 4291*32k 140*1k We are having troubles getting a single process to malloc more than 60 Mbytes, we can get the same program running in separate windows to malloc over 120 Mbytes, but a single instance of the program cannot seem to grab more than about 60 Mbytes. The simple test program listed below can grab 32 Mbytes, 60-70 Mbytes when linked with "gcc -o test test.o -lmalloc". BTW when we run this program there is plenty of free swap according to pstat -s. #include main( int argc, char *argv[] ) { void *p; int num; num = atoi( argv[1] ); p = malloc( num*1000000 ); if ( p == NULL ) { printf( "That's it.\n" ); } else { printf( "Got it.\n" ); } if ( p != NULL ) free ( p ); } Can anybody point out what in the world I'm doing wrong (no this is NOT a trick question). Thanks in advance, Ian Searle