Windows Vista restricts GNU GCC apps to 32 MB

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed May 2 21:04:54 UTC 2007


On Tue, May 01, 2007 at 10:37:42PM -0400, Andrej Marjan wrote:
> Not quite. Since you've revived the thread and several people have been misled 
> by the article, allow me to expound needlessly.
> 
> I don't know to what extent he's confused and to what extent he's being 
> intentionally inflammatory, but in a nutshell, he's complaining that a 
> change/regression of the NT DOS emulator in Vista prevents DOS binaries from 
> allocating more than 32 MB, and that the Windows C runtime library and 
> compilers don't do what he wants them to do.
> 
> First, DJGPP is a variant of GCC that produces DOS binaries. The guy uses 
> DJGPP to produce DOS binaries that use extended memory managers to allocate 
> hundreds of MB of memory. This works under DOS and DOS-derived OS's like 
> Win98. 
> 
> NT has always had a limited DOS emulator. It's never worked with all DOS 
> binaries, especially games. Apparently prior to Vista (and possibly WIn2k3), 
> the NT DOS emulator allowed his DOS binaries to allocate all the memory they 
> wanted. As of Vista, however, there's a cap of 32 MB.
> 
> So much for the DOS part.
> 
> On to the Windows part: Windows has a perfectly good C89 runtime built in, but 
> this guy says the MS compiler doesn't support long long (for a long time a 
> GCC extension and now I think part of C99), and better compilers don't 
> support the GMP library.
> 
> Your interpretation doesn't make much sense since the "standard C interfaces" 
> have to be implemented in terms of the host OS's system calls. On Unix, 
> malloc(3) is implemented in terms of brk(2). The Windows C runtime has a 
> working malloc() implementation, that happens to be implemented in terms of 
> the Win32 API (of which I'm blissfully ignorant so I can't name the relevant 
> functions). Keep in mind that Win32 is *the* system API of Vista (the NT 
> kernel has its own API that Win32 sits on top of, but it's hidden entirely 
> behind Win32).
> 
> A *Win32* binary that links against the Windows C runtime and uses only C89 
> functions, can have as much RAM as it wants. This problem is strictly related 
> to *DOS* binaries running in the DOS *emulator* on Vista.
> 
> So, this is a really long-winded way to say that, in the grand scheme of 
> things, he's making a mountain out of a molehill. 

Well now it makes more sense (I was wondering what DPMI had to do with
anything before since I only rememberd that from DOS days, and DJGPP
also sounded like DOS).  OK this guy needs to start writing his code to
work with windows if he wants it to work on windows.  Lots of other
peopel seem to manage to share code and just have a small bit of system
specific code as glue.

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list