A simple configurable hog program to simulate apps that exceed their memory allocation.
HOG_MAX_BYTES: How much memory to hog before exiting. Default isLONG_MAX, which essentially means no limit. Set to e.g.2147483648to hog up to 2 GiB.HOG_WAIT_SECONDS: How long to wait before we start hogging. Default is 0, which means don't wait at all. Set to e.g.2to wait 2 seconds before the hogging begins.HOG_GOAL_SECONDS: how long should the allocation ofHOG_MAX_BYTEShappen over? Default is0, which means hog as fast as possible. Set to e.g.60for the hogging to happen over a minute.HOG_CHECKPOINTS: how often should the hog stop and sleep in order to hitHOG_GOAL_SECONDS? The higher this number, the more accurate the stopping point (and the more likely the hog is to stop if it receivesSIGTERM). Default is64.
MIT License, see LICENSE for details.
Copyright (c) 2019 Aptible and contributors.