diff --git a/CMakeLists.txt b/CMakeLists.txt index f27d5f8e..704dc1b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -263,10 +263,7 @@ if(MI_BUILD_SHARED) target_compile_definitions(mimalloc PRIVATE ${mi_defines} MI_SHARED_LIB MI_SHARED_LIB_EXPORT) target_compile_options(mimalloc PRIVATE ${mi_cflags}) target_link_libraries(mimalloc PUBLIC ${mi_libraries}) - target_include_directories(mimalloc PUBLIC - $ - $ - ) + target_include_directories(mimalloc PUBLIC $) if(WIN32) # On windows copy the mimalloc redirection dll too. if(CMAKE_SIZEOF_VOID_P EQUAL 4) @@ -292,10 +289,7 @@ if (MI_BUILD_STATIC) target_compile_definitions(mimalloc-static PRIVATE ${mi_defines} MI_STATIC_LIB) target_compile_options(mimalloc-static PRIVATE ${mi_cflags}) target_link_libraries(mimalloc-static PUBLIC ${mi_libraries}) - target_include_directories(mimalloc-static PUBLIC - $ - $ - ) + target_include_directories(mimalloc-static PUBLIC $) if(WIN32) # When building both static and shared libraries on Windows, a static library should use a # different output name to avoid the conflict with the import library of a shared one. @@ -332,10 +326,7 @@ if (MI_BUILD_OBJECT) set_property(TARGET mimalloc-obj PROPERTY POSITION_INDEPENDENT_CODE ON) target_compile_definitions(mimalloc-obj PRIVATE ${mi_defines}) target_compile_options(mimalloc-obj PRIVATE ${mi_cflags}) - target_include_directories(mimalloc-obj PUBLIC - $ - $ - ) + target_include_directories(mimalloc-obj PUBLIC $) # the following seems to lead to cmake warnings/errors on some systems, disable for now :-( # install(TARGETS mimalloc-obj EXPORT mimalloc DESTINATION ${mi_install_libdir}) diff --git a/ide/vs2019/mimalloc-override-test.vcxproj b/ide/vs2019/mimalloc-override-test.vcxproj index 7a9202f1..28731d40 100644 --- a/ide/vs2019/mimalloc-override-test.vcxproj +++ b/ide/vs2019/mimalloc-override-test.vcxproj @@ -177,7 +177,8 @@ - + + diff --git a/ide/vs2019/mimalloc-override.vcxproj b/ide/vs2019/mimalloc-override.vcxproj index 4136e574..e00f7af0 100644 --- a/ide/vs2019/mimalloc-override.vcxproj +++ b/ide/vs2019/mimalloc-override.vcxproj @@ -94,7 +94,8 @@ Disabled true true - ../../include + + MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions); MultiThreadedDebugDLL false @@ -122,7 +123,8 @@ Disabled true true - ../../include + + MI_DEBUG=3;MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions); MultiThreadedDebugDLL false @@ -151,7 +153,8 @@ true true true - ../../include + + MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);NDEBUG AssemblyAndSourceCode $(IntDir) @@ -183,7 +186,8 @@ true true true - ../../include + + MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);NDEBUG AssemblyAndSourceCode $(IntDir) diff --git a/ide/vs2019/mimalloc.vcxproj b/ide/vs2019/mimalloc.vcxproj index 98dee520..f301bc5a 100644 --- a/ide/vs2019/mimalloc.vcxproj +++ b/ide/vs2019/mimalloc.vcxproj @@ -96,7 +96,8 @@ Disabled true true - ../../include + + MI_DEBUG=3;%(PreprocessorDefinitions); CompileAsCpp false @@ -115,7 +116,8 @@ Disabled true true - ../../include + + MI_DEBUG=3;%(PreprocessorDefinitions); CompileAsCpp false @@ -142,7 +144,8 @@ MaxSpeed true true - ../../include + + %(PreprocessorDefinitions);NDEBUG AssemblyAndSourceCode $(IntDir) @@ -170,7 +173,8 @@ MaxSpeed true true - ../../include + + %(PreprocessorDefinitions);NDEBUG AssemblyAndSourceCode $(IntDir) diff --git a/include/mimalloc-types.h b/include/mimalloc-types.h index 750a2b28..89eaf316 100644 --- a/include/mimalloc-types.h +++ b/include/mimalloc-types.h @@ -10,7 +10,7 @@ terms of the MIT license. A copy of the license can be found in the file #include // ptrdiff_t #include // uintptr_t, uint16_t, etc -#include // _Atomic +#include "mimalloc-atomic.h" // _Atomic #ifdef _MSC_VER #pragma warning(disable:4214) // bitfield is not int diff --git a/src/alloc-aligned.c b/src/alloc-aligned.c index 724c0a1b..c8a52871 100644 --- a/src/alloc-aligned.c +++ b/src/alloc-aligned.c @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" #include // memset diff --git a/src/alloc-override-osx.c b/src/alloc-override-osx.c index 3a46ecd9..89c86745 100644 --- a/src/alloc-override-osx.c +++ b/src/alloc-override-osx.c @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" #if defined(MI_MALLOC_OVERRIDE) diff --git a/src/alloc-posix.c b/src/alloc-posix.c index 43931e56..6567c61b 100644 --- a/src/alloc-posix.c +++ b/src/alloc-posix.c @@ -9,8 +9,8 @@ terms of the MIT license. A copy of the license can be found in the file // mi prefixed publi definitions of various Posix, Unix, and C++ functions // for convenience and used when overriding these functions. // ------------------------------------------------------------------------ -#include "mimalloc.h" -#include "mimalloc-internal.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" // ------------------------------------------------------ // Posix & Unix functions definitions diff --git a/src/alloc.c b/src/alloc.c index e3052f48..6183643f 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4,9 +4,9 @@ This is free software; you can redistribute it and/or modify it under the terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" +#include "../include/mimalloc-atomic.h" #include // memset, strlen #include // malloc, exit diff --git a/src/arena.c b/src/arena.c index 3f93c590..e06644d5 100644 --- a/src/arena.c +++ b/src/arena.c @@ -20,9 +20,9 @@ which is sometimes needed for embedded devices or shared memory for example. The arena allocation needs to be thread safe and we use an atomic bitmap to allocate. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" +#include "../include/mimalloc-atomic.h" #include // memset #include // ENOMEM diff --git a/src/bitmap.c b/src/bitmap.c index 50fd4742..500b907c 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -17,8 +17,8 @@ The `_across` postfixed functions do allow sequences that can cross over between the fields. (This is used in arena allocation) ---------------------------------------------------------------------------- */ -#include "mimalloc.h" -#include "mimalloc-internal.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" #include "bitmap.h" /* ----------------------------------------------------------- diff --git a/src/heap.c b/src/heap.c index cba0fd06..4f680000 100644 --- a/src/heap.c +++ b/src/heap.c @@ -5,9 +5,9 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" +#include "../include/mimalloc-atomic.h" #include // memset, memcpy diff --git a/src/init.c b/src/init.c index 76c20842..bcde4507 100644 --- a/src/init.c +++ b/src/init.c @@ -4,8 +4,8 @@ This is free software; you can redistribute it and/or modify it under the terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" #include // memcpy, memset #include // atexit diff --git a/src/options.c b/src/options.c index 055f8446..bf2b1028 100644 --- a/src/options.c +++ b/src/options.c @@ -4,9 +4,9 @@ This is free software; you can redistribute it and/or modify it under the terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" +#include "../include/mimalloc-atomic.h" #include #include // strtol diff --git a/src/os.c b/src/os.c index 42ed342e..ba8db49f 100644 --- a/src/os.c +++ b/src/os.c @@ -16,9 +16,9 @@ terms of the MIT license. A copy of the license can be found in the file #undef _XOPEN_SOURCE #undef _POSIX_C_SOURCE #endif -#include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" +#include "../include/mimalloc-atomic.h" #include // strerror diff --git a/src/page.c b/src/page.c index b732c078..c9d43c9f 100644 --- a/src/page.c +++ b/src/page.c @@ -11,9 +11,9 @@ terms of the MIT license. A copy of the license can be found in the file exported is `mi_malloc_generic`. ----------------------------------------------------------- */ -#include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" +#include "../include/mimalloc-atomic.h" /* ----------------------------------------------------------- Definition of page queues for each block size diff --git a/src/random.c b/src/random.c index 255bede4..88d2c893 100644 --- a/src/random.c +++ b/src/random.c @@ -4,8 +4,8 @@ This is free software; you can redistribute it and/or modify it under the terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" #include // memset diff --git a/src/region.c b/src/region.c index 79540730..53bf5df9 100644 --- a/src/region.c +++ b/src/region.c @@ -31,9 +31,9 @@ Possible issues: linearly. At what point will direct OS calls be faster? Is there a way to do this better without adding too much complexity? -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" +#include "../include/mimalloc-atomic.h" #include // memset diff --git a/src/segment.c b/src/segment.c index 76ce2e0b..a26fb1ba 100644 --- a/src/segment.c +++ b/src/segment.c @@ -4,9 +4,9 @@ This is free software; you can redistribute it and/or modify it under the terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" +#include "../include/mimalloc-atomic.h" #include // memset #include diff --git a/src/static.c b/src/static.c index 5b34ddbb..19d2c54f 100644 --- a/src/static.c +++ b/src/static.c @@ -13,8 +13,8 @@ terms of the MIT license. A copy of the license can be found in the file #undef _POSIX_C_SOURCE #endif -#include "mimalloc.h" -#include "mimalloc-internal.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" // For a static override we create a single object file // containing the whole library. If it is linked first diff --git a/src/stats.c b/src/stats.c index ecf07e4d..31c156f9 100644 --- a/src/stats.c +++ b/src/stats.c @@ -4,9 +4,9 @@ This is free software; you can redistribute it and/or modify it under the terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ -#include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "../include/mimalloc.h" +#include "../include/mimalloc-internal.h" +#include "../include/mimalloc-atomic.h" #include // fputs, stderr #include // memset