https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86422
--- Comment #8 from Boris Staletic <boris.staletic at gmail dot com> --- > ulimit -s unlimited After running that command and enabling swap, for a total of 16GB available memory, until about 5 minute mark, cc1plus was consuming >4GB. After about five minute mark, cc1plus started consuming memory rapidly, and in about a minute or so, it consumed all 16GB. The end result is OOM killer stopping cc1plus.