Code of the Day: malloc()

Today’s nugget of machine-trashing goodness is brought to you by malloc().

#include <unistd.h>

int main() { while (1) { malloc(2000); } return 1; }

I originally wanted it to stop when it ran out of RAM but you know, it just wasn’t worth the time to fix it.

Yes, I’m testing per-user limits on machines. No, I didn’t get them right the first time. Yes, that’s why I love VMware.

🙂