[comp.sys.ibm.pc.programmer] system

alexande@borland.com (Mark Alexander) (06/11/91)

Email bounced, sorry.

In small data models, the startup code allocates a 64K segment for
global and static data, the near heap, and the stack (plus code in
tiny model).  In large data models, heap space is allocated only as
needed, and the stack occupies its own segment, typically 4K.  This is
why your program uses more space in small data models.

You can reduce the amount of heap allocated in a small data model
program by setting the _heaplen variable.  The stack size is similarly
controlled with _stklen.  See Chapter 3 in the BC++ Library Reference
for more information.