Hi!
27-Фев-2004 09:42 [EMAIL PROTECTED] (maintainer freedospg) wrote to
[EMAIL PROTECTED]:
mf> I want to know if there is a way to release memory
mf> from the unused heap to the OS when I shell out?
mf> PG runtime takes up 80K, but it needs about 40K.
mf> I managed to move the stack down to a designated address,
mf> but memory was not released. Turbo C 2.01, small model.
mf> Can somebody help?
helpme!.doc from BC3.1 packages contains question "How do I change the
stack size". Beside _stklen, BC3.1 help files describes _heaplen variable.
For example:
______________O\_/_________________________________\_/O______________
Data Segment size
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Model │ Data Segment Calculated As...
═════════╪═════════════════════════════════════════
Tiny │ 256 + Code + Global Data + Heap + Stack
Small │ Global Data + Heap + Stack
Medium │ Global Data + Heap + Stack
Compact │ Global Data
Large │ Global Data
Huge │ Each module has its own data segment
■ In the tiny model, everything (including code) is in the same segment,
so the data segment computations are adjusted to include the code plus
256 bytes for the PSP.
> ■ In the small and medium models, the size of the heap can be adjusted
> with _heaplen and the size of the stack can be adjusted with _stklen.
■ In the compact and large models, there is no near heap, and the stack
is in its own segment.
■ In the huge model, the stack is a separate segment, and each module
has its own data segment.
_____________________________________________________________________
O/~\ /~\O
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel