2017-08-28 157 views
0

有誰知道一個工具,可以消耗一定量的Windows 7(64位)的內存?
我想在可用RAM變低時測試軟件的行爲。工具模擬RAM使用

在此先感謝!

回答

1

由Sysinternals着名的Mark Russinovich提供了一個名爲TestLimit的工具。你可以從:https://live.sysinternals.com/WindowsInternals/獲得32和64位版本。

要分配1024 MB,你可以做到以下幾點:

testlimit64.exe -d 1024 -c 1 

,並通過按Ctrl +ç結束它。

下面的命令行選項是可用的:

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 specfy minimum stack reserve (in KB). 
    -u  Create USER handles to menus. 
    -w  Reset working set minimum to highest possible value.