From: Patrick Steinhardt <ps@pks.im>
To: Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, peff@peff.net,
Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH v2] read-cache: free threaded memory pool
Date: Wed, 2 Oct 2024 12:49:12 +0200 [thread overview]
Message-ID: <Zv0lISjo-5bHzEzW@pks.im> (raw)
In-Reply-To: <pull.1801.v2.git.1727804265033.gitgitgadget@gmail.com>
On Tue, Oct 01, 2024 at 05:37:44PM +0000, Derrick Stolee via GitGitGadget wrote:
> From: Derrick Stolee <stolee@gmail.com>
>
> 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.
Thanks, this looks good to me.
Patrick
prev parent reply other threads:[~2024-10-02 10:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 11:40 [PATCH 0/2] read-cache: two small leak fixes Derrick Stolee via GitGitGadget
2024-09-30 11:40 ` [PATCH 1/2] read-cache: free threaded memory pool Derrick Stolee via GitGitGadget
2024-09-30 12:32 ` Patrick Steinhardt
2024-10-01 13:20 ` Derrick Stolee
2024-10-01 14:11 ` Patrick Steinhardt
2024-09-30 11:40 ` [PATCH 2/2] read-cache: free hash context in do_write_index() Derrick Stolee via GitGitGadget
2024-09-30 12:32 ` Patrick Steinhardt
2024-10-01 10:01 ` Derrick Stolee
2024-10-01 10:16 ` Patrick Steinhardt
2024-10-01 17:37 ` [PATCH v2] read-cache: free threaded memory pool Derrick Stolee via GitGitGadget
2024-10-02 10:49 ` Patrick Steinhardt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zv0lISjo-5bHzEzW@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).