Mail Archives: djgpp/1996/06/26/12:13:27
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 |
\---------------------------------------------------------------------/
- Raw text -