Xref: news2.mv.net comp.os.msdos.djgpp:5413 From: Enrico Horn Newsgroups: comp.os.msdos.djgpp Subject: Re: Executable size Date: Wed, 26 Jun 1996 12:41:27 +0200 Organization: Technische Universitaet Ilmenau Lines: 36 Message-ID: <31D113D7.139C@prakinf.tu-ilmenau.de> References: <199606260016 DOT RAA11404 AT netcom2 DOT netcom DOT com> NNTP-Posting-Host: classic2.prakinf.tu-ilmenau.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Marc Singer DJ-Gateway: from newsgroup comp.os.msdos.djgpp Marc Singer wrote: > > > > > Hi All, > > > > Is the filesize of a DJGPP created program limited to 640k? I know you can > > allocate tons of memory etc, and have lots of fun whilst its running, but can > > the initial size be greater than this? > > > > Nope. I expect that this is in the FAQ. You can load programs larger > than system memory, if you want to, but you'll page like crazy. Are you sure? I think you are wrong! As far as I know, you can exes have bigger than 640k because of the way loading of DJGPP programs work: Plain DOS loads only that 2k stub at the beginning of the DJGPP executable. This stub: - loads the DPMI server (if its not already installed) - enters protected mode through DPMI calls - loads your program code (the rest without the stub) - starts your program . So the program is loaded IN protected mode. And that means: You have theoretically 4 Gigabyte of memory (in reality it depends on the DPMI server), and your exe can have a size which is larger than that 640k boundary. Regards, Enrico. -- /---------------------------------------------------------------------\ |Enrico Horn Tel. 036738/41929 | |07426 Lichta E-mail: enrico DOT horn AT prakinf DOT tu-ilmenau DOT de | |Ortsstrasse Nr. 14 http://www.prakinf.tu-ilmenau.de/~ehorn | \---------------------------------------------------------------------/