windows - 模拟 RAM 使用的工具

标签 windows ram

<分区>

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

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

最佳答案

Sysinternals 有一个名为 TestLimit 的工具,由著名的 Mark Russinovich 开发。您可以从以下位置获取:Microsoft Sysinternals - Testlimit作为 32 位和 64 位版本。 DL-Link

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

testlimit64.exe -d 1024 -c 1

然后通过 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.

关于windows - 模拟 RAM 使用的工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45913280/

相关文章:

windows - 如何在git bash下更改目录

windows - 无法安装 perl 模块 Crypt::TEA

windows - 单击批处理文件与将文件夹拖到批处理文件上时,循环目录搜索结果的批处理文件会发生变化

algorithm - 大量 block 变长数据的外部排序

windows - Kubernetes 在 Windows 10 上使用 Docker Desktop 卡在 'Starting'

windows - 通过 WinAPI 和 Delphi 在 Skype 客户端中查找和使用当前事件的聊天框?

python - 避免 OSError : [Errno 22] Invalid argument when read()ing large file

python - 内存中的数据大小与磁盘上的数据大小

python - 我的 Django 项目是否消耗了异常数量的 RAM?

java - Java 的堆和栈是否都驻留在 RAM 中,与 C++ 类似?