Microsoft C - Heap space question
Christopher D. Brown
cb at sequoia.UUCP
Thu Sep 7 22:53:17 AEST 1989
In article <3631 at cbnewsh.ATT.COM> jmn at 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 at cs.texas.edu
Voice: (512) 346-4980
More information about the Comp.lang.c
mailing list