MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / mi_unix_mmap_fd

Function mi_unix_mmap_fd

3rd/mimalloc-2.0.9/src/os.c:585–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585static int mi_unix_mmap_fd(void) {
586#if defined(VM_MAKE_TAG)
587 // macOS: tracking anonymous page with a specific ID. (All up to 98 are taken officially but LLVM sanitizers had taken 99)
588 int os_tag = (int)mi_option_get(mi_option_os_tag);
589 if (os_tag < 100 || os_tag > 255) os_tag = 100;
590 return VM_MAKE_TAG(os_tag);
591#else
592 return -1;
593#endif
594}
595
596static void* mi_unix_mmap(void* addr, size_t size, size_t try_alignment, int protect_flags, bool large_only, bool allow_large, bool* is_large) {
597 void* p = NULL;

Callers 2

mi_unix_mmapFunction · 0.85
mi_os_commitxFunction · 0.85

Calls 1

mi_option_getFunction · 0.85

Tested by

no test coverage detected