TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: CHRIS BERKHOUT
from: DARRYL GREGORASH
date: 1998-01-06 16:36:00
subject: Memory Allocation

Replying to a message of Chris Berkhout to Darryl Gregorash:
 CB>> Well behaved programs will resize themselves 
 CB>> I guess that with .EXE's there is some kind of compiler
 CB>> directive  ....
 DG>> Linker directive actually; the code to resize allocated
 DG>> memory is placed in the .exe loader, which is written at
 DG>> link time.
(As someone pointed out to me via netmail, I did mean "header" there, not 
"loader") 
 CB>         So the code for that is run after the .EXE is
 CB> started,  rather than DOS doing it during loading based on
 CB> values from the header ?
Exactly; DOS merely assigns all available memory in one block to any program 
it loads, and it is then up to the application to manage what it has been 
given. 
In this case, we wish to give up some of that memeory so we can request 
memory for a different purpose. In a .exe, you can achieve that with linker 
directives, in a .com you must write the code yourself.
--- FleetStreet 1.21 NR
---------------
* Origin: BIG BANG Burger Bar: Regina SK Canada (1:140/86)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.