version 2.2, 2001-08-21

Maintainer: pmj.


grabmem is a utility that allocates a chunk of memory, then immediately frees it and exits. That is its purpose in life; that is all that it does, and it does it reasonably well.

grabmem -- now with new improved <BASTARD MODE>!


"But why?", you ask. Well, two main reasons:

  1. To solve system problems
  2. To cause system problems

Briefly, the kinds of system problems that may be solved are ones related to resource starvation, that resource being memory. Grabbing and freeing a whole lot of it will make it available for whatever programs start running directly after.

The kinds of system problems that may be caused are also those related to the starvation of memory, as grabmem may be instructed to keep the memory allocated and never exit, and even exercise that memory so that it will not be swapped out. By doing this quickly, grabmem can make even a UNIX machine painfully unresponsive. Remember, that if you do this to someone else's machine, you may cause discomfort to other users, and they may discomfit you.

grabmem is also useful for testing, eg. simulating a low-memory configuration or testing a system's sustained memory bandwidth, although substantially better test suites and methods are available.


I don't need money. I didn't write this program to get rich from it. I wrote it for myself, and decided that other people may find it useful. If you find it useful, please do not attempt to pay me. Send an email instead. Include a photo of something in your home town if it pleases you. Berate me for any bugs you find. Request features. Submit patches. Propose novel theories of physics. Look up at the sky. Smile at pretty strangers in the street. Go home early. Live. And know that your true friends are there for you, despite the fact that you spend too much time reading documentation.


This program is free software, so you get the source code and can do just about anything with it, short of limiting other people's rights to the code. You can even sell it and incorporate it into your own programs if you wish; asx long as you abide by the terms set out in the LICENSE document, it's OK.


Feel free to download the tar.gz package, the precompiled binaries for 32 bit Linux and 64 bit Linux, or just browse the source code.

For more information, run grabmem --help, or read the source code.


grabmem -- now with new improved <BASTARD MODE>!

Help promote the World Wide Waste of Space that grabmem is! Just embed this crappy banner ad on your pages as follows: <a href=><img src= width=468 height=60 alt="grabmem -- now with new improved <BASTARD MODE>!"></a>

This page is hosted on the mighty SourceForge. SourceForge Logo