www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/16/10:29:16

Date: Thu, 16 Jul 1998 10:29:12 -0400 (EDT)
Message-Id: <199807161429.KAA10057@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: grbhat AT unigoa DOT ernet DOT in
CC: djgpp AT delorie DOT com
In-reply-to: <Pine.LNX.3.91.980715085148.2978A-100000@aditya.unigoa.ernet.in>
(grbhat AT unigoa DOT ernet DOT in)
Subject: Re: The symbol "end"

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019