MCPcopy Index your code
hub / github.com/git/git / mmap_limit_check

Function mmap_limit_check

wrapper.c:865–876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863}
864
865static void mmap_limit_check(size_t length)
866{
867 static size_t limit = 0;
868 if (!limit) {
869 limit = git_env_ulong("GIT_MMAP_LIMIT", 0);
870 if (!limit)
871 limit = SIZE_MAX;
872 }
873 if (length > limit)
874 die(_("attempting to mmap %"PRIuMAX" over limit %"PRIuMAX),
875 (uintmax_t)length, (uintmax_t)limit);
876}
877
878void *xmmap_gently(void *start, size_t length,
879 int prot, int flags, int fd, off_t offset)

Callers 1

xmmap_gentlyFunction · 0.85

Calls 2

git_env_ulongFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected