mailing list of musl libc
 help / color / mirror / code / Atom feed
* malloc not behaving well when brk space is limited?
@ 2014-03-29 17:00 u-igbb
  2014-03-29 17:15 ` Timo Teras
  0 siblings, 1 reply; 9+ messages in thread
From: u-igbb @ 2014-03-29 17:00 UTC (permalink / raw)
  To: musl

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-31  4:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-29 17:00 malloc not behaving well when brk space is limited? 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
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

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