unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: Zack Weinberg via Libc-alpha <libc-alpha@sourceware.org>
Cc: DJ Delorie <dj@redhat.com>,  Zack Weinberg <zack@owlfolio.org>
Subject: Re: [PATCH] malloc: Use correct C11 atomics for fastbin
Date: Mon, 12 Dec 2022 12:57:25 +0100	[thread overview]
Message-ID: <87mt7ssul6.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <ypiktu21thtu.fsf@owlfolio.org> (Zack Weinberg via Libc-alpha's message of "Sun, 11 Dec 2022 22:35:25 -0500")

* Zack Weinberg via Libc-alpha:

>> * The current malloc knows a lot about glibc internals like pthreads and
>>   fork, so as to manage those boundaries properly (thread start/stop,
>>   etc).
>
> Similarly I am wondering how _this_ manages to work with LD_PRELOADed
> malloc replacements.  (I confess I haven’t ever dug into this part of
> glibc much at all.)

We call malloc as part of pthread_create, which ensures single-threaded
initialization of replacement mallocs.  Otherwise, it's up to the
replacements to register atfork handlers as needed.

Thanks,
Florian


  reply	other threads:[~2022-12-12 11:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 16:09 [PATCH] malloc: Use correct C11 atomics for fastbin Wilco Dijkstra via Libc-alpha
2022-11-21 16:18 ` Florian Weimer via Libc-alpha
2022-11-21 16:55   ` Wilco Dijkstra via Libc-alpha
2022-11-21 16:56     ` Wilco Dijkstra via Libc-alpha
2022-11-21 17:00     ` Florian Weimer via Libc-alpha
2022-12-02  5:11 ` DJ Delorie via Libc-alpha
2022-12-02  6:36   ` Florian Weimer via Libc-alpha
2022-12-02 10:56     ` Wilco Dijkstra via Libc-alpha
2022-12-02 11:24       ` Florian Weimer via Libc-alpha
2022-12-02 12:02         ` Wilco Dijkstra via Libc-alpha
2022-12-02 18:55           ` DJ Delorie via Libc-alpha
2022-12-05 18:39             ` Zack Weinberg via Libc-alpha
2022-12-06 16:19               ` DJ Delorie via Libc-alpha
2022-12-12  3:35                 ` Zack Weinberg via Libc-alpha
2022-12-12 11:57                   ` Florian Weimer via Libc-alpha [this message]
2022-12-12 11:56                 ` Florian Weimer via Libc-alpha
2022-12-06 13:29             ` Wilco Dijkstra via Libc-alpha
2022-12-06 13:37               ` Adhemerval Zanella Netto via Libc-alpha
2022-12-06 14:31                 ` Zack Weinberg via Libc-alpha
2022-12-06 16:23               ` DJ Delorie via Libc-alpha
2022-12-15 15:43                 ` Wilco Dijkstra via Libc-alpha
2022-12-02 18:55     ` DJ Delorie via Libc-alpha
  -- strict thread matches above, loose matches on Subject: below --
2022-12-06 15:04 Wilco Dijkstra via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mt7ssul6.fsf@oldenburg.str.redhat.com \
    --to=libc-alpha@sourceware.org \
    --cc=dj@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=zack@owlfolio.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).