Mail Archives: djgpp/1998/07/16/10:29:16
> 1. Where is the label "end" positioned and how? (I mean in which
> module). crt0 uses the label "end" to calculate
> "__what_size_app_thinks_it_is"
The linker puts it just after everything that the linker puts into
your program (after code, data, and bss). It is pretty much
guaranteed to be the highest-valued defined symbol in your program.
> 2. Am I correct in understanding that "__what_size_app_thinks_it_is"
> is the actual size of application in memory as opposed to
> "__what_size_dpmi_thinks_we_are" is the same rounded to the nearest
> 64K ?
__what_size_app_thinks_it_is is just that - how much memory the
program *thinks* it has (i.e. what sbrk(0) would return).
__what_size_dpmi_thinks_we_are is the actual size of our memory
region, which happens to be rounded to 64k (or more).
- Raw text -