4 ms·
At my last job I wrote a build system that build maybe 30 or 40 executables from several hundred source files. Sometimes when I'd run make -j with no constraint
by jschwartzi 9y ago
At my last job I wrote a build system that build maybe 30 or 40 executables from several hundred source files. Sometimes when I'd run make -j with no constraint my desktop environment would crash.
It turned out that the OOM killer was triggering because I was filling up memory with compiler invocations.
I was really proud of that bug.
- bmurphy1976 9y agoI seem to end up building a lot of stuff on memory constrained devices for some reason. The OOM killer is always a problem, but it's easily avoided by provisioning an excessive amount of swap. It's slow, but slow is faster than never. Did you have any swap at the time?
- jschwartzi 9y agoYeah, probably. It was just a desktop Ubuntu system.
- lathiat 9y agoThis might sound really obvious but you know you can do "make -j12" or some other number, right?
- jschwartzi 9y agoYeah, I do. I just found it hilarious that my build system could take down my window manager.