. NET's memory limit

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.