delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/09/06:54:43

Date: Thu, 9 Dec 1999 11:13:31 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: beat studer <beat_studer AT freesurf DOT ch>
cc: djgpp AT delorie DOT com
Subject: Re: Size
In-Reply-To: <82mdri$c49$1@news1.sunrise.ch>
Message-ID: <Pine.SUN.3.91.991209111245.21000H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 8 Dec 1999, beat studer wrote:

> If you
> run a program with a DOS-Shell and look at the memory (e.g.  with 'mem /c')
> you'll find that only a relatively small portion is loaded into memory (e.g.
> 100 kb file-size vs. 17 kb in memory).

"mem /c" on Windows is not useful with DJGPP programs, because it
doesn't show any changes in the extended memory, where most of the
memory used by DJGPP programs resides.  Those 17KB in conventional
memory that you see in MEM's report are the 16KB transfer buffer and
some other data that must be below 1MB.  But the bulk of the memory
used by a DJGPP program: the code, the data, and the satck, is not
shown at all by MEM, because they live in DPMI memory which MEM
doesn't include in its report.  To prove this to yourself, run a
REALLY large DJGPP program and look at what MEM reports when run from
that program: you will still see those same 17KB (actually, closer to
18KB, but that's immaterial).

See section 15.8 of the DJGPP FAQ list for more about this.

- Raw text -


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