lkml.org 
[lkml]   [2004]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] get_unmapped_area() change -> non booting machine


On Thu, 12 Feb 2004, Ingo Molnar wrote:
>
> i've pasted the relevant glibc malloc code below - it does use mmap() as
> a fallback.
>
> why in this particular case it failed i dont know - i believe some
> _minimal_ brk space is supposed to be available though, so if you break
> mmap() to fill in the brk space then that might break glibc assumptions.

I really think that we should aim for "brk()" just working. It's often
faster than mmap, and it's one of those very basic things (ie we should
_not_ assume we have glibc and malloc(), and others may well want to use
brk() too).

For now, the fix is to just revert the change that triggered this. But in
the long run I'd like to make it less fragile without having magic special
cases.

One option is to mark the brk() VMA's as being grow-up (which they are),
and make get_unmapped_area() realize that it should avoid trying to
allocate just above grow-up segments or just below grow-down segments.
That's still something of a special case, but at least it's not "magic"
any more, now it's more of a "makes sense".
Hmm?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [from the cache]
©2003-2011 Jasper Spaans