Malloc Problems with DECstation 5000/200

Ian R. Searle ian at ssc-vax.UUCP
Tue Apr 16 14:06:30 AEST 1991


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 <stdio.h>
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



More information about the Comp.unix.ultrix mailing list