Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!rreiner From: rreiner@yunexus.YorkU.CA (Richard Reiner) Newsgroups: comp.lang.c Subject: sbrk() in MS C 5.1 on MS-DOS Keywords: sbrk() msc msdos ms-dos Message-ID: <15179@yunexus.YorkU.CA> Date: 16 Sep 90 01:49:51 GMT Organization: York U. Computing Services Lines: 12 I'm trying to use sbrk(negative_number) to persuade MS C 5.1 to give some of its heap back to MS-DOS in a small model program so as to leave more room for a spawn(). My little program is only about 20K of code + 2K of data, but it seems to grab and keep a full 64K data segment, thus reserving about 85K for itself during the spawn(). sbrk(negative_number) gives me an error return if negative_number < -400; and calling sbrk() even with a small argument causes the spawn() call a few lines later to fail. Have I missed something, or is this just the usual MS-DOS foolishness? --richard