MCPcopy Create free account
hub / github.com/apache/arrow / mprotect

Function mprotect

cpp/src/arrow/io/mman.h:136–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136static inline int mprotect(void* addr, size_t len, int prot) {
137 DWORD newProtect = __map_mmap_prot_page(prot);
138 DWORD oldProtect = 0;
139
140 if (VirtualProtect(addr, len, newProtect, &oldProtect)) return 0;
141
142 errno = __map_mman_error(GetLastError(), EPERM);
143
144 return -1;
145}
146
147static inline int msync(void* addr, size_t len, int flags) {
148 if (FlushViewOfFile(addr, len)) return 0;

Callers

nothing calls this directly

Calls 2

__map_mmap_prot_pageFunction · 0.85
__map_mman_errorFunction · 0.85

Tested by

no test coverage detected