--- "Arkady V.Belousov" <[EMAIL PROTECTED]>
的郵件內容:> 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
>
Hello Arkady,
I'm not sure if other memory models will cause
problems to the assembly routines using global
variables.
It is tempting to save 40k but the effort...
Turbo C 2.01 helpme!.doc illustrated to use a global
extern unsigned _stklen = 10k;
I changed some other values, but same result.
I don't have BC 3.1, to test _heaplen, so no report.
I wonder if I should move the MCB as well, and adjust
the value in offset 3..4 accordingly before INT 21H,
AH=4AH.
Thanks
BAHCL
_________________________________________________________
必殺技、飲歌、小星星...
浪漫鈴聲 情心連繫
http://us.rd.yahoo.com/evt=22281/*http://ringtone.yahoo.com.hk/
-------------------------------------------------------
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_id=1356&alloc_id=3438&op=click
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel