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

Function MNNUnmapFile

source/core/MNNFileUtils.cpp:302–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302ErrorCode MNNUnmapFile(void * addr, size_t size)
303{
304#if defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)
305 if (!UnmapViewOfFile(addr)) {
306 return FILE_UNMAP_FAILED;
307 }
308#else
309 if (-1 == munmap(addr, size)) {
310 return FILE_UNMAP_FAILED;
311 }
312#endif
313 return NO_ERROR;
314}
315
316ErrorCode MNNMmapSync(void * addr, size_t size)
317{

Callers 9

syncMethod · 0.85
onCreateMethod · 0.85
onExecuteMethod · 0.85
saveKVCacheInDiskMethod · 0.85
_cleanMethod · 0.85
unmapKVCacheMethod · 0.85
~ MmapAllocatorMethod · 0.85
onReleaseMethod · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by 1

runMethod · 0.68