QuarticCat's Blog

Recent content on QuarticCat's Blog

马上订阅 QuarticCat's Blog RSS 更新: https://blog.quarticcat.com/index.xml

No more OOM in C/C++/Rust builds

2024年7月2日 08:00
I’ve seen people complaining about some gigantic C/C++/Rust projects engulfing all of their memory during building from time to time. Fortunately, there are a few simple methods to alleviate the pain without sacrificing speed. By “simple,” I mean you don’t have to modify your code! Root of the problem Usually, the most memory-consuming part of C/C++/Rust builds is the linking phase. To link object files, the linker must read all of them into memory.