Hello,
Applications compiled with native XDS Modula-2 on Windows seem to limit
the maximum memory available to an application to about 1.5 GB. Other
compilers allow up to 2 GB. I've attached a small test program below.
When compiled with XDS (v 2.45) it exits at around 1.5 GB under Win 2K
and Win XP Pro. When compiled with the Stonybrook compiler, the
program reachs 2 GB. A similar C program compiled with MSC 6 also
allocates up to 2 GB.
Any ideas as to the cause? Is there a compiler or linker option that
can be used to overcome this limitation?
Thanks for any help.
-Scott
MODULE test;
FROM SYSTEM IM****T ADDRESS;
IM****T STextIO, SWholeIO;
<*IF Stonybrook THEN*>
IM****T WIN32;
<*ELSE*>
IM****T Windows;
<*END*>
PROCEDURE Test;
VAR
i : INTEGER;
a : ADDRESS;
BEGIN
i:=0;
REPEAT
<*IF Stonybrook THEN*>
a:=WIN32.GlobalAlloc(WIN32.GMEM_FIXED,100000000);
<*ELSE*>
a:=Windows.GlobalAlloc(Windows.GMEM_FIXED,100000000);
<*END*>
INC(i);
SWholeIO.WriteInt(i,0);
UNTIL a=NIL;
STextIO.WriteLn;
END Test;
BEGIN
Test;
STextIO.WriteString("done"); STextIO.WriteLn;
END test.