mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 03:48:42 +03:00
merge from dev
This commit is contained in:
commit
5869c85749
6 changed files with 49 additions and 52 deletions
|
@ -12,8 +12,8 @@ option(MI_XMALLOC "Enable abort() call on memory allocation failure by
|
|||
option(MI_SHOW_ERRORS "Show error and warning messages by default (only enabled by default in DEBUG mode)" OFF)
|
||||
option(MI_USE_CXX "Use the C++ compiler to compile the library (instead of the C compiler)" OFF)
|
||||
option(MI_SEE_ASM "Generate assembly files" OFF)
|
||||
option(MI_INTERPOSE "Use interpose to override standard malloc on macOS" ON)
|
||||
option(MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" OFF) # enables interpose as well
|
||||
option(MI_INTERPOSE "Use interpose to override standard malloc on macOS" OFF)
|
||||
option(MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" ON)
|
||||
option(MI_LOCAL_DYNAMIC_TLS "Use slightly slower, dlopen-compatible TLS mechanism (Unix)" OFF)
|
||||
option(MI_BUILD_SHARED "Build shared library" ON)
|
||||
option(MI_BUILD_STATIC "Build static library" ON)
|
||||
|
@ -76,15 +76,12 @@ if(MI_OVERRIDE)
|
|||
# use zone's on macOS
|
||||
message(STATUS " Use malloc zone to override malloc (MI_OSX_ZONE=ON)")
|
||||
list(APPEND mi_sources src/alloc-override-osx.c)
|
||||
list(APPEND mi_defines MI_OSX_ZONE=1)
|
||||
if(NOT MI_INTERPOSE)
|
||||
message(STATUS " (enabling INTERPOSE as well since zone's require this)")
|
||||
set(MI_INTERPOSE "ON")
|
||||
endif()
|
||||
list(APPEND mi_defines MI_OSX_ZONE=1)
|
||||
endif()
|
||||
if(MI_INTERPOSE)
|
||||
# use interpose on macOS
|
||||
message(STATUS " Use interpose to override malloc (MI_INTERPOSE=ON)")
|
||||
message(STATUS " WARNING: interpose does not seem to work reliably on the M1; use -DMI_OSX_ZONE=ON instead")
|
||||
list(APPEND mi_defines MI_INTERPOSE)
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue