Memory footprint is reduced by 3.7%, and developers release patch sets to reduce the maximum memory usage when compiling Linux kernels
CTOnews.com, December 28-Developer Thomas Weißschuh today released eight patch sets designed to reduce the maximum memory usage when compiling the Linux kernel. For developers compiling kernels in memory-constrained distributions, the new patch reduces Swap and version creation time.
CTOnews.com has learned that Weißschuh's patch set released today is mainly to reduce the maximum memory usage when compiling the Linux kernel. In particular, memory usage when using objtool to process vmlinux.o objects is also the most memory-intensive step in the kernel build process.
After installing today's patch set, peak memory usage was reduced by 3.7% when dealing with vmlinux.o, where malloc () related functions in the loop were passed to calloc () functions outside the loop; by 3.8% when compiling the kernel via Thomas, memory usage was reduced by reducing struct reloc memory usage; and by 0.5% by optimizing the layout of structural symbols. In addition, the patch set has been optimized in other aspects, but the degree of optimization is not obvious.
Simply put, this patch series under review should help reduce memory usage spikes when compiling the Linux kernel, which in turn helps compile the Linux kernel.