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 /git-compat-util.h | |
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 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index fb6e9af76b..fa6dd92219 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -876,6 +876,7 @@ char *xstrndup(const char *str, size_t len); void *xrealloc(void *ptr, size_t size); void *xcalloc(size_t nmemb, size_t size); void *xmmap(void *start, size_t length, int prot, int flags, int fd, off_t offset); +const char *mmap_os_err(void); void *xmmap_gently(void *start, size_t length, int prot, int flags, int fd, off_t offset); int xopen(const char *path, int flags, ...); ssize_t xread(int fd, void *buf, size_t len); |