内存消耗测试
来源:互联网 发布:tcp端口号怎么看 编辑:程序博客网 时间:2024/06/02 16:58
今天在阅读邮件时发现某位大神给出了两个可以快速消耗内存的方法。
Here's 2 commands you can run on a test system that will consume a significant amount of memory without installing any additional software.host:~ # dd if=/dev/zero of=/dev/null bs=1Twhere bs (block size) is around the size of your memory commit limit (cat /proc/meminfo and note CommitLimit). Of course you can use any value you like depending on how much memory you want to use. If you specify too large of a value it will fail to allocate the buffer.Also you can just tell bash to consume as much memory as possible with a command line like this:host:~ # A=0; while true; do A="$A$A"; done-bash: xrealloc: cannot reallocate 18446744071562068096 bytes (0 bytes allocated)It will keep running until it consumes so much memory it fails to allocate anymore for its internal buffer.
仅供参考
0 0
- 内存消耗测试
- shipyard的内存消耗统计-测试
- 消耗内存
- 消耗内存
- 消耗内存
- 测试_手机应用的内存消耗输出到excel
- C语言——内存消耗测试程序
- 对象的内存消耗
- iBATIS的内存消耗
- iBATIS的内存消耗
- 关于内存消耗问题
- ExtJs tabpanel 内存消耗
- RabbitMQ内存消耗
- 如何估算内存消耗
- 如何估算内存消耗
- MySQL内存消耗计算
- 测试hashmap 内存消耗情况 两种遍历方式耗时情况
- 怎么测试一个java程序占用的内存和cpu消耗?
- Java中getResourceAsStream的用法
- FEDERATED存储引擎的使用,如何开启FEDERATED,FEDERATED Support NO?
- Virtual Studio中设置异常触发 LoaderLock
- 计算脸部部位在坐标系中的位置
- Codeforces 616E - Sum of Remainders
- 内存消耗测试
- #Android源码#自定义UI控件
- bzoj2127: happiness
- MFC简单皮肤颜色绘制(SetDialogBkColor不再被支持,看 WM_CTLCOLOR消息如何百变控件颜色)
- Android 自定义对话框(控制大小、位置)
- 即时通讯收发语音,兼容安卓wav和amr格式互转
- spring mvc redirect/forward 表单重复提交
- 性能测试之互联网应用需求建模分析
- 带你从源码的角度理解Volley