I run a long compilation that uses lots of memory. At a point it fails with SIGABRT. I would like to know how much memory is used then, before shutting down the process.
I use CentOS.
Is it possible by shell means to write a hook that is run before the process' memory is freed up by the operating system?