bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] exec: Properly preallocate address space


From: Samuel Thibault
Subject: Re: [PATCH 4/4] exec: Properly preallocate address space
Date: Mon, 3 Jul 2023 13:51:21 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Sergey Bugaev, le lun. 03 juil. 2023 12:05:29 +0300, a ecrit:
> On Mon, Jul 3, 2023 at 11:40 AM Samuel Thibault <samuel.thibault@gnu.org> 
> wrote:
> > Sergey Bugaev, le lun. 03 juil. 2023 11:19:54 +0300, a ecrit:
> > > But the brk is at a fixed high address (BRK_START),
> >
> > On x86_32 it's not that high.
> 
> It is pretty high (2 GB)

Ah, right!

That's "recent" :)

As in: more recent than that 128MB push-up.

Basically, in the past (before introducing BRK_START), we were putting
the brk right after data end, as usually done on Unix. Processes used
to get mapped at 0x08000000, so there was quite some room for mmaps to
go below that, before getting in the way of the heap growing up. But
that was still not much room. And in the case of PIE executables, the
executable and libraries would get mapped at the beginning of the
address space, and thus leave no room at all for mmaps before they get
in the way of the heap.

Thus, not so long ago, I moved the heap away from the data end, so that
mmap has room in between. The 128MiB room thus became obsolete, and we
can just drop it, indeed.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]