diff options
author | Zhen Lei <thunder.leizhen@huawei.com> | 2022-11-02 16:49:16 +0800 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2022-11-12 18:47:36 -0800 |
commit | 19bd8981dc2ee35fdc81ab1b0104b607c917d470 (patch) | |
tree | f6aa4bb086792556d242c82f7f6810296705d499 /kernel/kallsyms_internal.h | |
parent | 010a0aad39fccceba4a07d30d163158a39c704f3 (diff) | |
download | linux-stable-19bd8981dc2ee35fdc81ab1b0104b607c917d470.tar.gz linux-stable-19bd8981dc2ee35fdc81ab1b0104b607c917d470.tar.bz2 linux-stable-19bd8981dc2ee35fdc81ab1b0104b607c917d470.zip |
kallsyms: Reduce the memory occupied by kallsyms_seqs_of_names[]
kallsyms_seqs_of_names[] records the symbol index sorted by address, the
maximum value in kallsyms_seqs_of_names[] is the number of symbols. And
2^24 = 16777216, which means that three bytes are enough to store the
index. This can help us save (1 * kallsyms_num_syms) bytes of memory.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/kallsyms_internal.h')
-rw-r--r-- | kernel/kallsyms_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kallsyms_internal.h b/kernel/kallsyms_internal.h index a04b7a5cb1e3..27fabdcc40f5 100644 --- a/kernel/kallsyms_internal.h +++ b/kernel/kallsyms_internal.h @@ -26,6 +26,6 @@ extern const char kallsyms_token_table[] __weak; extern const u16 kallsyms_token_index[] __weak; extern const unsigned int kallsyms_markers[] __weak; -extern const unsigned int kallsyms_seqs_of_names[] __weak; +extern const u8 kallsyms_seqs_of_names[] __weak; #endif // LINUX_KALLSYMS_INTERNAL_H_ |