]> git.ipfire.org Git - thirdparty/git.git/commit
read-cache: free threaded memory pool
authorDerrick Stolee <stolee@gmail.com>
Tue, 1 Oct 2024 17:37:44 +0000 (17:37 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Oct 2024 18:51:15 +0000 (11:51 -0700)
commit5e6f359f6b7829e3baea888f5489f04eebf745af
tree214371998a6c14d19a4624a81f0839546d360728
parent39bf06adf96da25b87c9aa7d35a32ef3683eb4a4
read-cache: free threaded memory pool

In load_cache_entries_threaded(), each thread allocates its own memory
pool. This pool needs to be cleaned up while closing the threads down,
or it will be leaked.

This ce_mem_pool pointer could theoretically be converted to an inline
copy of the struct, but the use of a pointer helps with existing lazy-
initialization logic. Adjusting that behavior only to avoid this pointer
would be a much bigger change.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c