[comp.sys.sequent] malloc and -lpps

fletcher@cs.utexas.edu (Fletcher Mattox) (11/22/89)

This may be a naive question; I'm an admitted rookie with
the parallel programming library.

Can one not use malloc() and -lpps in the same program?
This happens under 3.0.4, though 3.0.12 is similar.

	Script started on Tue Nov 21 14:36:17 1989
	cs.utexas.edu% cat zz.c
	main(argc, argv)
	char *argv[];
	{
		char *p, *malloc();

		if ((p = malloc(atoi(argv[1]))) == 0)
			perror("malloc");
		return 0;
	}
	cs.utexas.edu% cc zz.c -lpps
	cs.utexas.edu% a.out 34800
	cs.utexas.edu% a.out 34900
	malloc: Not enough memory
	cs.utexas.edu% pstat -s
	150420 used, 145832 free, 51432 wasted
	avail (num*size): 67*2048 4*1024 3*512 3*256 7*128 6*64 4*32 
	cs.utexas.edu% ^D
	script done on Tue Nov 21 14:37:12 1989

fletcher@cs.utexas.edu (Fletcher Mattox) (11/24/89)

In article <7237@cs.utexas.edu> I wondered:

>Can one not use malloc() and -lpps in the same program?

The problem is that private bss is limited to 64k when
using shared memory, so malloc() will fail if used
to allocate any substantial amount of private memory.

A possible workaround is to increase private bss with 
the -Z switch to ld(1).