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)? Ive 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 Id like something didnt need me to modify the code.
We have been using Canned Heat – it isnt open source but it is freely available – which will thrown your system into certain states to test whether your application degrades gracefully under certain conditions, one of which I believe is unsufficient memory allocation. I am not sure if it is Windows only though, but certainly worth checking.