1

My less-powerful computer has 6GB of RAM. I am writing software that performs a RAM-intensive task on some large data sets. I would like to establish that it will run on a computer with 3GB of RAM, and I don't want to borrow a computer every time I want to run a test. Is there a simple, easily reversible way of temporarily limiting the amount of RAM available to all processes running on a machine?

  • The above comment does not provide an answer to the question. grin – Jamie Hanrahan Apr 10 '17 at 12:41
1

Yes, but it'll require a reboot.

  1. Run msconfig
  2. Click the Boot tab
  3. Click "Advanced options..."
  4. Check the "maximum memory" checkbox
  5. Enter the number of MB you'd like the system to use (e.g. 3072 for "3 GB")
  6. OK twice

Reboot and you'll be running with 3 GB RAM.

If you'd like to be able to select this at boot time without using msconfig over and over... then assuming you have a default Boot Configuration Database (BCD) with only one entry in it...

  1. Open a command prompt running as Administrator

    (details: From your Start menu, type cmd - you should see a shortcut for cmd.exe. Right-click it and click Run as administrator. If you already have a shortcut for command prompt on your taskbar, right-click it, then right-click command prompt from its context menu, then click Run as administrator. I always keep a command prompt shortcut on my taskbar for this purpose)

  2. At the command prompt, type

    bcdedit /copy {current} /d "Windows 7 limited RAM"

    This copies the BCD entry that booted your current system to a new entry, and assigns a description string of whatever you put in the quotes. You could of course say "3 GB RAM" instead of "limited RAM".

  3. Run msconfig. (Since you already have an admin command prompt, just type msconfig at the prompt.) This time you will see two entries in the Boot tab's window. (or maybe more, if you've modified the BCD before) Click the one that you added - the one that says "Limited RAM" (or whatever you set it to with bcdedit /copy) - and modify it as described above. Click OK twice.

The next time you reboot you will be offered a boot selection menu showing both "Windows 7" and "Windows 7 limited RAM" (or whatever). The default selection should remain the same, so if you just leave it alone it'll go ahead and boot your standard system after 30 seconds. You can change that timeout in msconfig's Boot tab. (I usually set mine to 10 seconds.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.