模拟RAM使用情况的工具

Azr*_*ael 4 windows ram

在Windows 7(64位)中是否存在可以消耗一定数量内存的工具?

我想在可用RAM变低时测试软件的行为。

And*_*ing 7

Sysinternals提供了一个名为TestLimit的工具,该工具由著名的Mark Russinovich提供。您可以从以下网址获得它:https : //live.sysinternals.com/WindowsInternals/,分别为32位和64位版本。

要分配1024 MB,您可以执行以下操作:

testlimit64.exe -d 1024 -c 1
Run Code Online (Sandbox Code Playgroud)

并通过Ctrl+ 结束C

以下命令行选项可用:

C:\Users\\...>testlimit64.exe

Testlimit v5.04 - test Windows limits
By Mark Russinovich - www.sysinternals.com

usage: testlimit [[-h [-u]] | [-p [-n]] | [-t [-n [KB]]] | [-u [-i]] | [-g [object size]] | [-a|-d|-l|-m|-r|-s [MB]] | [-w]] [-c [count]]
  -a       Leak Address Windowing Extensions (AWE) memory in
           specified MBs (default is 1).
  -c       Count of number of objects to allocate (default is as many as
           possible). This must be the last option specified.
  -d       Leak and touch memory in specified MBs (default is 1).
  -g       Create GDI handles of specified size (default 1 byte).
           Specify a size of 0 to cause GDI object exhaustion.
  -h       Create handles. Specify -u to also allocate file objects.
  -i       Exhaust USER desktop heap.
  -l       VirtualLock memory in specified MBs (default is 1).
  -m       Leak memory in specified MBs (default is 1).
  -p       Create processes - add -n to set min working set. Add -n to
           set min working set of processes to smallest.
  -r       Reserve memory in specified MBs (default is 1).
  -s       Leak shared memory in specified MBs (default is 1).
  -t       Create threads - add -n to specify minimum stack reserve (in KB).
  -u       Create USER handles to menus.
  -w       Reset working set minimum to highest possible value.
Run Code Online (Sandbox Code Playgroud)