From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>,
Florian Weimer <fweimer@redhat.com>
Cc: Siddhesh Poyarekar via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] malloc: Ensure that ptmalloc_init runs only once
Date: Fri, 18 Jun 2021 12:02:46 +0530 [thread overview]
Message-ID: <65bdfd68-fd63-a75f-74ce-b78b05dbcc0b@gotplt.org> (raw)
In-Reply-To: <6f4a7a10-85ca-db9c-f0de-b3d198fe3555@sourceware.org>
On 6/18/21 11:58 AM, Siddhesh Poyarekar via Libc-alpha wrote:
> On 6/18/21 11:25 AM, Florian Weimer wrote:
>> I think it's a three-state value to avoid calling
>> __malloc_initialize_hook multiple times. This is all a bit
>> under-documented unfortunately.
>
> How so? It's only called from ptmalloc_init now AFAICT and running
> ptmalloc_init concurrently won't work anyway.
To be clear what I'm suggesting is setting __malloc_initialized at the
entry of ptmalloc_init, which should ensure that the body is executed
only once as long as it is not called concurrently.
Siddhesh
next prev parent reply other threads:[~2021-06-18 6:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 10:32 Siddhesh Poyarekar
2021-06-17 14:31 ` Florian Weimer
2021-06-18 2:31 ` Siddhesh Poyarekar
2021-06-18 5:45 ` Florian Weimer
2021-06-18 5:51 ` Siddhesh Poyarekar
2021-06-18 5:55 ` Florian Weimer
2021-06-18 6:28 ` Siddhesh Poyarekar
2021-06-18 6:32 ` Siddhesh Poyarekar [this message]
2021-06-18 6:36 ` Florian Weimer
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=65bdfd68-fd63-a75f-74ce-b78b05dbcc0b@gotplt.org \
--to=siddhesh@gotplt.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=siddhesh@sourceware.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).