Re: Maximum Executable Size?



Larry Maturo wrote:

> I have heard the maximum executable size on Win32 is 4 gigs. Is this
> correct? If so, what causes this limit? Is there any way around it?
> Does Delphi have an even lower limit? If so, why?

No, the real limit is much lower <g>

Windows is currently a 32 bit technology, so the maximum memory that
can be addresses is limited bt the size of a 32 bit unsigned integer -
and that comes out at 4 Gb. That explains the theoretical upper limit
you were given.

In practice, MS reserve the top 2Gb of this address space for Windows
itself, so this limits you to 2Gb. That is your 'hard' theoretical
limit, but in practice it is less again!

When you run you application it is going to want to load DLLs. These
DLLs will also load into that 2Gb of memory. Even if you write no DLLs
yourself, the Windows OS is implemented as a LOT of DLLs, so you are
going to load a dozen or so of these for a typical program.

Note: There is a switch to tell Windows to make 3Gb or memory avaiable
to your process, but the extra Gb is not contiguous with the lower 2Gb
so you cannot use this to load even bigger exectubles! Although it
will make more data space available.

AlsdairM(TeamB)
.



Relevant Pages

  • Re: Memory limit reached with Windows Mobile
    ... That would explain the memory problem - you just can't do that. ... You have to load stuff when it's ... All native DLLs get loaded ...
    (microsoft.public.pocketpc.developer)
  • Re: Memory limit reached with Windows Mobile
    ... I do understand what a test is, and I do understand how memory management ... ctacke: re-read Patrick's questions, ... 1- Load the same DLL over and over. ... Loading native DLLs takes at least 64k each. ...
    (microsoft.public.pocketpc.developer)
  • Re: Memory limit reached with Windows Mobile
    ... That would explain the memory problem - you just can't do that. ... Once I reached the 12 Mb limit, I cannot load any DLLs, yet if I ... Actually, simply by loading our 18 Native DLLs, we reduce the Virtual ...
    (microsoft.public.pocketpc.developer)
  • Re: Memory limit reached with Windows Mobile
    ... ctacke: re-read Patrick's questions, ... 1- Load the same DLL over and over. ... Loading native DLLs takes at least 64k each. ... good thing due to the 64k minimum virtual memory size each will take. ...
    (microsoft.public.pocketpc.developer)
  • Re: Memory limit reached with Windows Mobile
    ... available memory, but oinbounded by the CF itself. ... MissingMethodException while loading Native DLLs when most of our ... 1- Load the same DLL over and over. ... we decided to pre-load all our Native DLLs ...
    (microsoft.public.pocketpc.developer)

Loading