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.thiba...@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