MCPcopy Create free account
hub / github.com/alibaba/MNN / MNNMmapSync

Function MNNMmapSync

source/core/MNNFileUtils.cpp:316–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316ErrorCode MNNMmapSync(void * addr, size_t size)
317{
318#if defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)
319 if (!FlushViewOfFile(addr, 0)) {
320 return FILE_UNMAP_FAILED;
321 }
322#else
323 if (-1 == msync(addr, size, MS_SYNC)) {
324 return FILE_UNMAP_FAILED;
325 }
326#endif
327 return NO_ERROR;
328}

Callers 2

unmapKVCacheMethod · 0.85
syncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected