Happy Holidays If you have enjoyed reading the new and original content on Phoronix each and every day this year, consider showing your support by the end of year / holiday deal on Phoronix Premium. Phoronix Premium helps make operations possible while you get to enjoy ad-free viewing and multi-page articles on a single page. There have been more than 2,800 news articles and 185+ Linux hardware reviews written this year by your’s truly, but unfortunately, operations remain difficult driven by extreme ad-block use.
Updated patches were sent out today that aim to reduce the maximum memory usage while compiling the Linux kernel. In turn for memory constrained systems that attempt to compile the kernel this should lead to less swapping and faster build times.
Thomas Weißschuh sent out his latest patches aiming to reduce the maximum memory use while compiling the Linux kernel. In particular, he’s taking aim at the memory use of processing the vmlinux.o object with objtool, which is the most memory intensive step for the kernel build process.
The set of eight patches make adjustments to the objtool code to reduce memory use. In particular, switching from malloc() in a loop to calloc() out of a loop in objtool code yielded a reduction of 3.7% in peak memory use while processing vmlinux.o. Reducing the memory usage of the struct reloc lowered the memory use by another 3.8% in another kernel build by Thomas. Optimizing the layout of the struct symbol lowered memory use by 0.5% and then a few other optimizations without noted improvements.
Long story short, this patch series undergoing review should help in reducing peak memory use while compiling the Linux kernel and in turn help out with builds particularly for systems with limited amounts of RAM that may otherwise hit swapping during the build process that in turn will cause the build speed to suffer.