Hi!
16-Май-2005 18:41 [EMAIL PROTECTED] (Eric Auer) wrote to
[email protected]:
EA> The 3.00 version was EXE, the new version is a COM.
EA> However, SHSUCDX has dynamic allocation of memory, so
EA> the com / exe difference is not overly important. The
It _is_ important - even if forget about nonoptimal block selection,
there will be no chance for builtin allocator, if it will not run (because
too small block will be selected for loading packed executable).
EA> Even a COM can know how much RAM is free, by two means:
EA> 1. Size of the current memory block and 2. value of the
EA> stack pointer (can be 0 to indicate 64k free, N to tell
SP for .COM _can't_ be 0 (because zero on top of stack).
EA> that N bytes minus the amount of stack that you want are
EA> free...). For the EXE case, you can define a min / max
EA> heap size,
In header defined size of required memory - there not differentiated,
if this size will all used for stack or also for heap.
EA> and the EXE can check 1. Size of the current
.EXE (itself) _shouldn't_ check present memory, because if it runned,
then there _is_ required memory allocation.
EA> memory block and 2. amount of unallocated RAM left (i.e.
EA> RAM which is left after DOS allocated the max-wanted-
EA> heap size for the EXE)...
DOS allocates _all_ memory, unless max-mem is less than free size.
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel