Does anyone know of a tool for linux which allows you to test how an app behaves when it runs short of memory (i.e. when memory allocation starts failing)? I've managed to run this sort of test by messing around with the code of the app (introducing massive memory leaks, modifying malloc to randomly return null etc.), but I'd like something didn't need me to modify the code.
Thanks in advance for any help.