项目作者: dseevr

项目描述 :
memory consumption as a service
高级语言: C++
项目地址: git://github.com/dseevr/memory_consumer.git
创建时间: 2016-09-08T02:35:33Z
项目社区:https://github.com/dseevr/memory_consumer

开源协议:BSD 3-Clause "New" or "Revised" License

下载


memory_consumer - Memory Consumption as a Service

This program just consumes however many megabytes of memory you specify and then sleeps forever.

It might be useful for simulating high memory usage situations or triggering OOMs during testing.

The Docker image is only 600kb!

Usage

NOTE: The default target in Makefile assumes Docker is installed. If not, check out build/build.sh for the g++ invocation.

  1. make
  2. ./build/output/memory_consumer 1024 # allocates 1gb of memory

Or just run the image right from my Docker Hub account:

  1. docker run billrobinson/memory_consumer 1024 # allocates 1gb of memory

License

BSD