Re: outofmemoryexception
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Sun, 19 Nov 2006 14:24:46 +0100
"tin" <tin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:89268474-E119-47E1-948A-BED5C9C7C95F@xxxxxxxxxxxxxxxx
hi, i have an exe that holds a very large Dictionary collection that would
takes about 2.5G in total. the machine has 4G RAM.
if i load the entire collection within an EXE, i would get
outofmemoryexception when it uses up to about 1.5G RAM. however, if i split
the collection into 2 seperate EXE, one can load up to 1.2G and another 1.3G
without any problems even if they both run at the sametime. the machine
still has about 500 MB RAM free afterward.
ideally, i like to have just one EXE to hold all 2.5G data ... is it
possible? any idea?
thanks!
32 bit Windows applications only have access to 2GB (or up to 3GB on /4GT RAM tuning enabled systems) user virtual address space, the process VAS is fragmented as a result of loading the modules (DLL's) into the address space. The result is that you won't ever find a contiguous area of memory larger than say ~1.5GB, when Windows Forms is loaded, you won't even find such an area.
Note also that it's not possible you had two Dictionaries of 1.2 and 1.3GB loaded at the same time, guess one of these was freed by the GC at the time the second was created.
Another thing to keep in mind is that .NET (the current versions on both 32 and 64 bit Windows) don't allow you to create objects larger than 2GB, so you will have to change your design.
Willy.
.
- Prev by Date: SOS 2.0 dll missing functionality
- Next by Date: Re: outofmemoryexception
- Previous by thread: SOS 2.0 dll missing functionality
- Next by thread: Re: outofmemoryexception
- Index(es):
Relevant Pages
|