Is there an alternative to sbrk()

Blair P. Houghton bph at buengc.BU.EDU
Sat Mar 3 03:43:03 AEST 1990


In article <5538 at ur-cc.UUCP> bwbe_c52 at uhura.cc.rochester.edu (Brent Benson) writes:
>I'm trying to port an application to the NeXT computer that uses the
>sbrk() UNIX system call.  I got a memory allocation error when
>trying to run the program; and the man page says:
>
>	The UNIX system calls `brk' and `sbrk' are not supported
>	on the NeXT computer.
>
>Does anyone know of an alternative call that would have the same
>functionality (assuming there is one).

malloc().

Really.

The NeXT box should be doing ANSI C, so malloc() and calloc()
are the only portable methods of getting bytes from the system.

Or maybe the program was rewriting its own malloc()...
Or maybe it was system software rather than an application...

				--Blair
				  "Sometimes, Unix reminds me of
				   Australian movies that feature
				   lots of post-armageddon automotive
				   resourcefulness...and sometimes
				   it reminds me of the Ford Pinto."



More information about the Comp.unix.questions mailing list