aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strlcpy-src.c
diff options
context:
space:
mode:
authorThomas Weißschuh <[email protected]>2022-12-27 16:00:59 +0000
committerJosh Poimboeuf <[email protected]>2023-02-01 09:15:23 -0800
commit8045b8f0b17edf375849f83c80dd05194850b6ed (patch)
tree24aa73268610f0191db29d47503f49490824edca /lib/test_fortify/write_overflow-strlcpy-src.c
parentcfd66e81799f4a2fdc6447fa99bdb1871f45ff08 (diff)
objtool: Allocate multiple structures with calloc()
By using calloc() instead of malloc() in a loop, libc does not have to keep around bookkeeping information for each single structure. This reduces maximum memory usage while processing vmlinux.o from 3153325 KB to 3035668 KB (-3.7%) on my notebooks "localmodconfig". Note this introduces memory leaks, because some additional structs get added to the lists later after reading the symbols and sections from the original object. Luckily we don't really care about memory leaks in objtool. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Josh Poimboeuf <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions