From: u-igbb@aetey.se
To: musl@lists.openwall.com
Subject: malloc not behaving well when brk space is limited?
Date: Sat, 29 Mar 2014 17:00:32 +0000 [thread overview]
Message-ID: <20140329170032.GJ8221@example.net> (raw)
Hello,
Background:
Compiling a native musl-based toolchain for ia32 on Linux 2.6+.
Using the standalone dynamic loader mode.
(The latter seems to lead to a quite limited heap space, by kernel
behaviour/design)
I encounter out of memory errors. A look at the malloc source does not
find any fallback to mmap when heap is exhausted. What would you suggest
as a suitable approach to make it work?
Somebody has possibly already encountered and solved this with musl?
I see also reports about a related out of memory problem with
pae-executables which means a solution might help many musl users.
The other standard libraries I am using (glibc, uclibc) seem to happily
switch to allocation from mmap() when the heap is full. I understand
that this costs some code and performance but a breakup is no good either.
Any ideas? Maintaining and using an external libmalloc or substituting
malloc in musl? This feels like quite a burden...
(Would musl internal calls to malloc notice the external library
and resolve to its entry points instead of the internal malloc?)
Rune
next reply other threads:[~2014-03-29 17:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-29 17:00 u-igbb [this message]
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
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=20140329170032.GJ8221@example.net \
--to=u-igbb@aetey.se \
--cc=musl@lists.openwall.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.
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).