On Fri, May 07, 2004 at 09:25:11AM +0200, Vincent Lefevre wrote: > On 2004-05-06 19:05:53 -0400, Daniel Jacobowitz wrote: > > On Fri, May 07, 2004 at 12:58:28AM +0200, Vincent Lefevre wrote: > > > On 2004-05-06 16:44:54 -0400, Daniel Jacobowitz wrote: > > > > The documentation in the 2.4 kernel is, indeed, wrong IIRC. > > > > > > > > BTW, from 2.6: > > > > In mode 2 the MAP_NORESERVE flag is ignored. > > > > > > This is precisely what I thought to be the bug in glibc: the fact > > > (at least with the 2.4 kernel) that this flag is used by glibc. > > > On which documentation is glibc based (in particular, concerning > > > old_mmap)? > > > > I don't know. The comments suggest malloc made the choice > > deliberately, though, so I don't think it's appropriate to reverse it. > > But there are no explanations concerning this choice. And without > explanations, it is difficult to say if this is right or wrong. > > The malloc(3) man page more or less says that this is a kernel bug > and a kernel with strict overcommit is necessary. But this is a > contradiction with the 2.4 kernel documentation, which says that > the kernel checks if there's enough memory left (if the memory is > really reserved -- so the problem of reserving memory comes from > the caller, here glibc).
Since I don't know enough to continue this discussion, I'm copying someone who does! Wolfram, is there documentation describing the choice of MAP_NORESERVE in glibc's malloc, or do you know someone else I should ask? Thanks in advance. -- Daniel Jacobowitz

