diff options
author | 2025-03-04 16:57:48 +1100 | |
---|---|---|
committer | 2025-03-08 12:13:26 +0100 | |
commit | 7be37c94da01be3364d0798544401087f2464c8a (patch) | |
tree | 5c7fc84cd27b744186754badc81e7b5fd2af8e66 /scripts/lib/kdoc/kdoc_parser.py | |
parent | initramfs: avoid memcpy for hex header fields (diff) | |
download | wireguard-linux-7be37c94da01be3364d0798544401087f2464c8a.tar.xz wireguard-linux-7be37c94da01be3364d0798544401087f2464c8a.zip |
initramfs: allocate heap buffers together
header_buf, symlink_buf and name_buf all share the same lifecycle so
needn't be allocated / freed separately. This change leads to a minor
reduction in .text size:
before:
text data bss dec hex filename
7914 1110 8 9032 2348 init/initramfs.o
after:
text data bss dec hex filename
7854 1110 8 8972 230c init/initramfs.o
A previous iteration of this patch reused a single buffer instead of
three, given that buffer use is state-sequential (GotHeader, GotName,
GotSymlink). However, the slight decrease in heap use during early boot
isn't really worth the extra review complexity.
Link: https://lore.kernel.org/all/20241107002044.16477-7-ddiss@suse.de/
Signed-off-by: David Disseldorp <ddiss@suse.de>
Link: https://lore.kernel.org/r/20250304061020.9815-6-ddiss@suse.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions