Hogmem 0.6

Filed under: Projects · Date: Thu Jun 9 10:10:00 2005

Hogmem is a program for managing memory status in development or test environments. It will reserve a specific amount of system memory and prevent the VMM from swapping the reserved memory to disk. This can be beneficial in various test cases where resource limits are not a meaningfull method for memory status management. This is version 0.6. The original program was a hack written in Perl. But as I had nothing else to do, and being at the time without an internet connection, I decided to write a real program out of this memory consumption tool.


The original function of the program was to prevent other test programs from using the system memory efficiently. This helps simulate real system stress where the test program is not entirely in control of the system.

Hogmem can be used as a stress test tool for all application development. When run in the background during application testing, the bottlenecks in performance can be detected more easily in areas where the application requires large amounts of memory. Please Note: Hogmem is not a memory diagnostics tool. For diagnosing system memory, use a tool like memtest.

Change log

New features in 0.6:

  • Program status is made visible with the -s parameter.

Enhancements in 0.6:

  • System memory configuration is detected using Linux sysinfo() call, instead of reading /proc/meminfo.
  • When run without parameters, the program defaults to allocate 25% of the system memory.
  • Default install location has been changed from /usr/bin to /usr/sbin.

New features in 0.5:

  • Quiet operation.
  • Limits can now be given in megabytes and gigabytes by adding M or G to the limit, respectively.

Bugs fixed in 0.5:

  • Long options work properly.

Enhancements in 0.5:

  • Friendly allocation mode for limits less than half the system memory.
  • Allocated memory is tested constantly when run, not just when the memory is allocated.
  • Manual pages updated.

New features in 0.4:

  • Parameters retrieved using getopt_long() standard function.
  • Create a lockfile to prevent running multiple instances of the program.
  • More verbose output.
  • Created Changelog file.

Bugs fixed in 0.4:

  • Don't fail with small limit/count values.


There should be a logic in the program to detect a system under heavy load. Such systems are likely to be production systems, and nonpriviledged users should have no business of running this application on those systems.


Version: 0.6
Download: /pub/hogmem-0.6.tar.bz2
Size: 14.00 KB
Checksum: ddf4c1b5e2c

Comments are disabled for this post.