1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/objtool
Thomas Weißschuh 8045b8f0b1 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 <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20221216-objtool-memory-v2-3-17968f85a464@weissschuh.net
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
2023-02-01 09:15:23 -08:00
..
arch powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
Documentation objtool: Check that module init/exit function is an indirect call target 2023-01-21 10:50:18 +01:00
include/objtool objtool: Allocate multiple structures with calloc() 2023-02-01 09:15:23 -08:00
.gitignore objtool: Install libsubcmd in build 2023-01-30 16:27:46 -08:00
Build objtool: Install libsubcmd in build 2023-01-30 16:27:46 -08:00
builtin-check.c objtool: Make struct check_options static 2023-02-01 09:15:23 -08:00
check.c objtool: Check that module init/exit function is an indirect call target 2023-01-21 10:50:18 +01:00
elf.c objtool: Allocate multiple structures with calloc() 2023-02-01 09:15:23 -08:00
Makefile objtool: Fix HOSTCC flag usage 2023-02-01 09:15:18 -08:00
objtool.c objtool: Add .call_sites section 2022-10-17 16:41:07 +02:00
orc_dump.c objtool: Use target file endianness instead of a compiled constant 2022-11-18 19:00:15 +11:00
orc_gen.c objtool: Use target file endianness instead of a compiled constant 2022-11-18 19:00:15 +11:00
special.c objtool: Make struct entries[] static and const 2023-02-01 09:15:22 -08:00
sync-check.sh Merge branch 'x86/cpu' into WIP.x86/core, to merge the NOP changes & resolve a semantic conflict 2021-04-02 12:36:30 +02:00
weak.c objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00