diff options
author | Eric Wong <e@80x24.org> | 2021-06-30 03:01:32 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-06-30 09:14:25 +0300 |
commit | dc0592941138df684770bfe800ccad6b810214c3 (patch) | |
tree | c568b52865a4551c0c39a2331e24dee77c0f69a3 /read-cache.c | |
parent | 670b81a890388c60b7032a4f5b879f2ece8c4558 (diff) |
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>
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c index 77961a3885..a80902155c 100644 --- a/read-cache.c +++ b/read-cache.c @@ -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; |