Thanks Chris!
I will try using another memory configuration (but it will have to wait a
while because it means a lot of rewriting). For the moment I gave up on
seting LARGEADDRESSAWARE in visual studio (as instructed from your link). I
got "specified cast not valid" when running my aplication from the Macro
Explorer. Maybe I need c++ installed in order to make it work?
Anyway, after some more reading and trying I was able to set the
LARGEADRESSAWARE from the comand line. For the benifit of anybody
experiencing the same problem I give your the steps I used to make it work on
my system (probably not the most elegant way);
4GB ram needed
1. Add /3GB switch to boot.ini (Start->Control
Panel->System->Advanced->System and recovery Settings->Edit)
Example (2 options at startup):
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Micro soft Windows XP
Professional" /fastdetect /NoExecute=OptIn
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Micro soft Windows XP
Professional 3GB" /fastdetect /NoExecute=OptIn /3GB
2.In order to be able to build from the comand line, run VSVARS32.BAT (in
the visual studio subdirectory: Common7\Tools)
3. Link the program with the LARGEADDRESSAWARE option using the editbin
program;
editbin /LARGEADDRESSAWARE myApp.exe
(first move myApp.exe to the Common7\Tools subdirectory and run the comand
from there)
Thanks again everybody for contributing!
Karl
""Chris Lyon [MSFT]"" wrote:
[color=blue]
> Hi Karl, Willy
>
>
> | You can't and don't have to set LARGEADDRESSAWARE for C# applications.
> All
> | you need is Net v1.1 and the boot.ini file /3GB switch.
>
>
> Actually, you can set this, and must if you want to take advantage of > 2GB
> of user space:
>
http://msdn.microsoft.com/library/de...us/vcext/html/
> vxlrfVCProjectEngineLibraryVCLinkerToolLargeAddres sAware.asp
>
> | But again this won't garantee you to get a contiguous range of memory of
> | that size (1.3 GB).
> | All it brings you is a larger process space, but don't expect you can
> | allocate more than 1.5 - 1.6 GB in one chunk.
>
> Willy is exactly right. There may not be a chunk in memory of that size
> available.
>
> Karl, have you considered a more dynamic data structure, like an ArrayList?
> That way the GC can allocate it in as many chunks as it needs.
>
> -Chris
>
>[/color]