public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: DJ Delorie <dj@redhat.com>
Cc: adhemerval.zanella@linaro.org, libc-alpha@sourceware.org,
	carlos@redhat.com
Subject: Re: sbrk() failure while processing tunables
Date: Wed, 3 Nov 2021 08:55:26 +0530	[thread overview]
Message-ID: <0deec191-a4c5-c025-2dca-653cb6432c2a@sourceware.org> (raw)
In-Reply-To: <xn5yta7wvx.fsf@greed.delorie.com>

On 11/3/21 08:45, DJ Delorie wrote:
> Siddhesh Poyarekar <siddhesh@sourceware.org> writes:
>> That'll work only for the dynamic case, you'll need special code for
>> static linking then.  Alternatively, the rtld_malloc code looks
>> sufficiently independent that it could be split out into its own file
>> and included directly into dl-tunables.c.
> 
> That implies that statically linked executables would have two
> independent malloc implementations...

Ahh no, not the full rtld_malloc implementation, I meant split out only 
the rtld_malloc function (with the couple of static vars it depends on) 
and call rtld_malloc() in dl-tunables instead of malloc().  The tunables 
allocation is likely the first one and it doesn't need to be freed for 
the lifetime of the process.  Also, it cannot use the system malloc 
since it sets up variables that control system malloc.

Siddhesh

      reply	other threads:[~2021-11-03  3:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 16:54 Adhemerval Zanella
2021-11-01 17:17 ` Siddhesh Poyarekar
2021-11-02 19:56   ` Adhemerval Zanella
2021-11-03  3:12     ` Siddhesh Poyarekar
2021-11-03  3:15       ` DJ Delorie
2021-11-03  3:25         ` Siddhesh Poyarekar [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=0deec191-a4c5-c025-2dca-653cb6432c2a@sourceware.org \
    --to=siddhesh@sourceware.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=carlos@redhat.com \
    --cc=dj@redhat.com \
    --cc=libc-alpha@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).