Xref: utzoo comp.sys.ibm.pc:34308 comp.lang.c:21559 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!tut.cis.ohio-state.edu!cs.utexas.edu!execu!sequoia!cb From: cb@sequoia.UUCP (Christopher D. Brown) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: Re: Microsoft C - Heap space question Keywords: heap microsoft-c Message-ID: <804@sequoia.UUCP> Date: 7 Sep 89 12:53:17 GMT References: <3631@cbnewsh.ATT.COM> Reply-To: execu!cb@cs.texas.edu Distribution: usa Organization: Execucom Systems Corp., Austin, Texas Lines: 23 In article <3631@cbnewsh.ATT.COM> jmn@cbnewsh.ATT.COM (john.b.medamana) writes: >Is it possible to get a separate physical segment (Group?) >for heap? I am using the Microsoft C large memory model. >The default allocation combines stack and heap into a >single 64K segment (DGROUP). Is there a way to get a >separate segment for heap? > >I'm using Microsoft C 5.1 and Microsoft LINK. MSC 5.1 _fmalloc, which is the large model malloc, allocates new, far memory until all (MS-DOS) available memory has been allocated; At this point _fmalloc calls _nmalloc as a last resort. Thus, ordinarily, allocation is not from DGROUP. Note that DGROUP is at the end of the load and can be extended by _nmalloc ONLY if the memory above it has not been allocated via _fmalloc, halloc, or direct calls to the MS-DOS memory allocation primatives. The library routines halloc and hfree may be of interest. They map directly to the MSDOS memory allocation primatives. Chris Brown Net: execu!cb@cs.texas.edu Voice: (512) 346-4980