7 void *gitfakemmap(void *start
, size_t length
, int prot
, int flags
, int fd
, off_t offset
)
11 if (start
!= NULL
|| !(flags
& MAP_PRIVATE
))
12 die("Invalid usage of gitfakemmap.");
14 if (lseek(fd
, offset
, SEEK_SET
) < 0) {
19 start
= xmalloc(length
);
26 int count
= read(fd
, start
+n
, length
-n
);
29 memset(start
+n
, 0, length
-n
);
45 int gitfakemunmap(void *start
, size_t length
)