Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-06-30 03:01:32 +0300
committerJunio C Hamano <gitster@pobox.com>2021-06-30 09:14:25 +0300
commitdc0592941138df684770bfe800ccad6b810214c3 (patch)
treec568b52865a4551c0c39a2331e24dee77c0f69a3 /packfile.c
parent670b81a890388c60b7032a4f5b879f2ece8c4558 (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 'packfile.c')
-rw-r--r--packfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packfile.c b/packfile.c
index 755aa7aec5..9ef6d98292 100644
--- a/packfile.c
+++ b/packfile.c
@@ -652,8 +652,8 @@ unsigned char *use_pack(struct packed_git *p,
PROT_READ, MAP_PRIVATE,
p->pack_fd, win->offset);
if (win->base == MAP_FAILED)
- die_errno("packfile %s cannot be mapped",
- p->pack_name);
+ die_errno(_("packfile %s cannot be mapped%s"),
+ p->pack_name, mmap_os_err());
if (!win->offset && win->len == p->pack_size
&& !p->do_not_close)
close_pack_fd(p);