mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: u-igbb@aetey.se
Cc: musl@lists.openwall.com
Subject: Re: malloc not behaving well when brk space is limited?
Date: Sat, 29 Mar 2014 14:56:19 -0400	[thread overview]
Message-ID: <20140329185619.GX26358@brightrain.aerifal.cx> (raw)
In-Reply-To: <20140329180229.GL8221@example.net>

On Sat, Mar 29, 2014 at 06:02:29PM +0000, u-igbb@aetey.se wrote:
> > Unfortunately the approach I want to use with mmap seems to be what
> > glibc uses for its thread-local arenas, and it performs something like
> > 2 to 10 times worse than brk... So unless we can solve that, I don't
> > think it's a good option. It could be a fallback, but I still don't
> > want PIE binaries running that much slower just because the kernel is
> > doing something wacky and wrong.
> 
> It is a _lot_ better to run an order of magnitude slower than to fail
> totally, isn't it? If you have any code doing mmap-fallback, I would be
> willing to test it and hopefully use.
> 
> > We need a good solution for this problem but I don't have one yet.
> 
> This looks like a showstopper. The applications do not work properly
> as-is and replacing malloc or adding mmap support from scratch by myself
> is a threshold too high, given the time constraints. :(
> 
> In other words, a bad solution would be much better than no solution.
> 
> Otherwise my impression from musl until now is excellent. Thanks
> for your work on it.

Yes, I understand. I didn't mean that this can't or shouldn't be
fixed, just that the changes I had hoped to make to malloc in the
1.1.x series are not looking like the right direction for fixing this,
so we're back to the question of what to do.

If you need a fix (or at least a workaround) right away, let me know
and I'll see if I can think of anything.

Rich


  reply	other threads:[~2014-03-29 18:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-29 17:00 u-igbb
2014-03-29 17:15 ` Timo Teras
2014-03-29 17:22   ` Rich Felker
2014-03-29 18:02     ` u-igbb
2014-03-29 18:56       ` Rich Felker [this message]
2014-03-29 19:54         ` u-igbb
2014-03-29 20:25           ` Rich Felker
2014-03-29 20:54             ` u-igbb
2014-03-31  4:51               ` Rich Felker

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=20140329185619.GX26358@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    --cc=u-igbb@aetey.se \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).