commit af9b7fee80c56b28b68b06d4452580ec51066242 from: Stefan Sperling date: Mon Jul 09 14:32:39 2018 UTC add compile-time switch which disables mmap for pack files commit - 57363308f3065159bcdea6be975c758e992781da commit + af9b7fee80c56b28b68b06d4452580ec51066242 blob - c285d19cbeb1af15ef229252db0008ea9e84dfbf blob + 856b6608a054f295377b1a15f34c5394f9f77c72 --- lib/pack.c +++ lib/pack.c @@ -584,10 +584,12 @@ cache_pack(struct got_pack **packp, const char *path_p if (err) goto done; +#ifndef GOT_PACK_NO_MMAP pack->map = mmap(NULL, pack->filesize, PROT_READ, MAP_PRIVATE, pack->fd, 0); if (pack->map == MAP_FAILED) pack->map = NULL; /* fall back to read(2) */ +#endif done: if (err) { if (pack) {