Do a little cloud before. NET program, often because of the large amount of data outofmemory abnormal, but look at the memory there are a lot of surplus, search the internet for the reason is this.
No matter how large the system memory is, a. NET object is currently capable of using up to 2G of memory.
For servers with 2G of memory,. NET can only use 1.2G of memory.
For servers with 4G of memory,. NET can use 2.4G of memory.
However, the system needs to be set up as follows:
1. Add the/3GB switch in the boot. ini file.
[boot loader]
Timeout=3
Default=multi (0) disk (0) rdisk (0) partition (2)/winnt
[Operating Systems]
multi (0) disk (0) rdisk (0) partition (2)/winnt= "????"/3GB
2. In the Command Line window, enter the directory, such as CD "C:/Program Files/microsoft Visual Studio. NET 2003/vc7/bin"
3. Run the link command: Link-edit-largeaddressaware server.exe (Server.exe for your. NET program)
4, your server.exe will be able to use 2.4G of memory
However, there is no egg to add to this point!
. NET's memory limit