xmmap: inform Linux users of tuning knobs on ENOMEM
Linux users may benefit from additional information on how to avoid ENOMEM from mmap despite the system having enough RAM to accomodate them. We can't reliably unmap pack windows to work around the issue since malloc and other library routines may mmap without our knowledge. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
670b81a890
commit
dc05929411
@ -2236,7 +2236,8 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist)
|
||||
|
||||
mmap = xmmap_gently(NULL, mmap_size, PROT_READ, MAP_PRIVATE, fd, 0);
|
||||
if (mmap == MAP_FAILED)
|
||||
die_errno(_("%s: unable to map index file"), path);
|
||||
die_errno(_("%s: unable to map index file%s"), path,
|
||||
mmap_os_err());
|
||||
close(fd);
|
||||
|
||||
hdr = (const struct cache_header *)mmap;
|
||||
|
Reference in New Issue
Block a user