MCPcopy Create free account
hub / github.com/git/git / reftable_mmap

Function reftable_mmap

reftable/system.c:147–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147int reftable_mmap(struct reftable_mmap *out, int fd, size_t len)
148{
149 void *data = xmmap_gently(NULL, len, PROT_READ, MAP_PRIVATE, fd, 0);
150 if (data == MAP_FAILED)
151 return REFTABLE_IO_ERROR;
152
153 out->data = data;
154 out->size = len;
155
156 return 0;
157}
158
159int reftable_munmap(struct reftable_mmap *mmap)
160{

Callers

nothing calls this directly

Calls 1

xmmap_gentlyFunction · 0.85

Tested by

no test coverage detected