Re: Memory Limit for Visual Studio 2005???
- From: "Peter Olcott" <NoSpam@xxxxxxxxxxxxx>
- Date: Fri, 22 Dec 2006 14:40:49 -0600
"Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> wrote in message
news:eOOSzggJHHA.4244@xxxxxxxxxxxxxxxxxxxxxxx
"Peter Olcott" <NoSpam@xxxxxxxxxxxxx> wrote in message
news:RHVih.128727$xM4.15597@xxxxxxxxxxxxxxx
"Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> wrote in message
news:%23mAxnRfJHHA.3872@xxxxxxxxxxxxxxxxxxxxxxx
"Peter Olcott" <NoSpam@xxxxxxxxxxxxx> wrote in message
news:HPUih.128718$xM4.75416@xxxxxxxxxxxxxxx
"Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> wrote in message
news:%23yLni8eJHHA.5104@xxxxxxxxxxxxxxxxxxxxxxx
"Peter Olcott" <NoSpam@xxxxxxxxxxxxx> wrote in message
news:RKQih.33440$B42.17767@xxxxxxxxxxxxxxx
It looks like System::Collections::Generic.List throws and OUT_OF_MEMORY
exception whenever memory allocated exceeds 256 MB. I have 1024 MB on my
system so I am not even out of physical RAM, much less virtual memory.
Are other people experiencing this same problem?
Why do you mention VS2005? This is thrown at program run-time, right? The
run-time limitation is 2GB for a CLR object type, that means that your
List can only hold at most 2GB, however, due heap fragmentation of a 32
bit process, the maximum size of a single object is limited to something
from 1.2GB up to 1.8GB depending on the type of OS and application. A
simple console application should be able to allocate a single List of
~1.6GB or more , Windows Forms will top at ~1.2GB for the largest List (or
array or whatever).
Willy.
If you have actually tested this and thus know that it works empirically
rather than theoretically, then this must be a limitation of Visual Studio
2005 Express. I could not get Visual Studio 2005 Express to allocate more
than 256 MB without abnormally terminating.
I was very pleased with its relative performance to Native Code Visual C++
6.0. It was something like 50% faster on every test.
No, once again this is run-time related VS does (and can't impose such
restrictions) , try to compile and run your code from the command-line
prompt if you do't trust me.
Keep in mind that when you don't pre-allocate the List, you will end with a
List doubling it's size each time it get's filled to the max. capacity, so
the OOM exception might get thrown when no free *contiguous* block of ~512MB
can be found in excess of the already allocated ~256MB.
Willy.
Willy.
It works fine for native code std::vector, yet does not work for either
managed std::vector or List<Byte> . The command line version failed to
compile.
There is no such thing like MANAGED std::vector,
Yes, there is just recently. This saves old C++ programmers like me alot of
learning curve switching to .NET.
and the program should compile just fine from the command line. if it compiles
from VS. Both VS and the csc.exe are both driving the same compiler.
Willy.
.
- Follow-Ups:
- Re: Memory Limit for Visual Studio 2005???
- From: Willy Denoyette [MVP]
- Re: Memory Limit for Visual Studio 2005???
- From: Willy Denoyette [MVP]
- Re: Memory Limit for Visual Studio 2005???
- References:
- Memory Limit for Visual Studio 2005???
- From: Peter Olcott
- Re: Memory Limit for Visual Studio 2005???
- From: Willy Denoyette [MVP]
- Re: Memory Limit for Visual Studio 2005???
- From: Peter Olcott
- Re: Memory Limit for Visual Studio 2005???
- From: Willy Denoyette [MVP]
- Re: Memory Limit for Visual Studio 2005???
- From: Peter Olcott
- Re: Memory Limit for Visual Studio 2005???
- From: Willy Denoyette [MVP]
- Memory Limit for Visual Studio 2005???
- Prev by Date: Re: Memory Limit for Visual Studio 2005???
- Next by Date: Re: net 2.0 IL assembler instructions online?
- Previous by thread: Re: Memory Limit for Visual Studio 2005???
- Next by thread: Re: Memory Limit for Visual Studio 2005???
- Index(es):
Relevant Pages
|