tag/Pool: enable option `zero_initialized`

Commit 44beae519d caused the MPD
executable to grow by more than 1 MB because the `slots` array
suddenly was not zero-initialized anymore, because the doubly-linked
list is circular, while the singly-linked list is zero-terminated.

This option moves the array back to the `bss` section.
This commit is contained in:
Max Kellermann 2023-09-11 20:30:52 +02:00
parent 7065425927
commit 3e09f95b40
1 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,8 @@ TagPoolSlot::Create(TagType type,
}
static std::array<IntrusiveList<TagPoolSlot,
IntrusiveListMemberHookTraits<&TagPoolSlot::list_hook>>,
IntrusiveListMemberHookTraits<&TagPoolSlot::list_hook>,
IntrusiveListOptions{.zero_initialized = true}>,
16127> slots;
static inline unsigned