C Program on Linux to exhaust memory

前端 未结 10 686
孤独总比滥情好
孤独总比滥情好 2020-12-24 03:06

I would like to write a program to consume all the memory available to understand the outcome. I\'ve heard that linux starts killing the processes once it is unable to alloc

10条回答
  •  执念已碎
    2020-12-24 03:29

    If all you need is to stress the system, then there is stress tool, which does exactly what you want. It's available as a package for most distros.

提交回复
热议问题