Developer Thomas Weißschuh has published his latest patch aimed at reducing the maximum memory usage when compiling the Linux kernel.while for tryingDevelopers compiling kernels on memory-constrained systemsthe new patch set should also reduce swapping and build times.
Thomas mainly forUse objtool to handle memory usage of vmlinux.o objects,This is also the most memory-intensive step in the kernel build process.
Processing vmlinux.o with objtool is the most memory-intensive step in the kernel build. By reducing the maximum memory usage here, we can reduce the maximum memory usage throughout the kernel build. As a result, memory pressure is relieved on memory-starved machines during kernel builds; and builds are faster because less swapping is required.
According to the introduction, this set of 8 patches has adjusted the objtool code to reduce memory usage. Specifically when dealing with vmlinux.o, switching from malloc() in a loop to calloc() outside the loop in objtool code reduced peak memory usage by 3.7%. In another kernel built by Thomas, reducing the memory usage of struct reloc reduced memory usage by another 3.8%; optimizing the layout of structure symbols reduced memory usage by 0.5%. Also, some other optimizations have been made, but no noticeable improvements.
See the kernel mailing list for more details.
#Developers #submit #patches #aimed #reducing #memory #usage #compiling #Linux #kernel #News Fast Delivery