32-bit program can apply to 4GB memory method on win764 bit system

Source: Internet
Author: User

The win764 bit system allows 32-bit programs to apply to 4GB memory methods.September 18, 2016 18:36:26Hits: 1550

Recently tested a 32-bit program is always in 1.2G memory crashes, suspected memory request failed, itself 32-bit program can only apply to 2GB memory, after the various methods and tests found on the Internet, the following method is feasible, can apply to 4GB memory.

1. Run cmd in admin mode, enter: Bcdedit/set PAE forceenable Windows

The bcdedit here is about the command line's startup configuration Editor. With the above command, you can enable physical Address Extension (PAE) to allow more than 4GB of supported memory

2. Run cmd in admin mode, input: Bcdedit/set increaseuserva 3072

To allow Windows to allocate more than 2G of memory to the application!

3, restart the computer.

4. Recompile the program.

5, in the Beginning-"program-" visual studio2010-, Find "visual Studio Command Prompt (2010)" opens a CMD window set vs environment variable, executed at the command line:

Editbin/largeaddressaware your program name. exe

If you want to restore 2GB mode, use the following command to remove

1. Bcdedit/deletevalues PAE

2, Bcdedit/deletevalues Increaseuserva

3, restart the computer.

If you use VS2010 (other compilers are not tested), you can enable 4GB mode directly by selecting Yes in the project Properties-linker-system-enable large address.

32-bit program can apply to 4GB memory method on win764 bit system

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.