diff options
author | Daan Leijen <daan@microsoft.com> | 2021-06-06 20:31:36 -0700 |
---|---|---|
committer | Daan Leijen <daan@microsoft.com> | 2021-06-06 20:31:36 -0700 |
commit | 1feb6123d90f5557a0fc1bc2afc72401e58f8cb0 (patch) | |
tree | 70909bcfdb5593fe23fa121fa870e1a79ffd4fea | |
parent | e2c095fad2a1d506712be0b22616f97cc927c05b (diff) |
make all includes relative
-rw-r--r-- | CMakeLists.txt | 15 | ||||
-rw-r--r-- | ide/vs2019/mimalloc-override-test.vcxproj | 3 | ||||
-rw-r--r-- | ide/vs2019/mimalloc-override.vcxproj | 12 | ||||
-rw-r--r-- | ide/vs2019/mimalloc.vcxproj | 12 | ||||
-rw-r--r-- | include/mimalloc-types.h | 2 | ||||
-rw-r--r-- | src/alloc-aligned.c | 4 | ||||
-rw-r--r-- | src/alloc-override-osx.c | 4 | ||||
-rw-r--r-- | src/alloc-posix.c | 4 | ||||
-rw-r--r-- | src/alloc.c | 6 | ||||
-rw-r--r-- | src/arena.c | 6 | ||||
-rw-r--r-- | src/bitmap.c | 4 | ||||
-rw-r--r-- | src/heap.c | 6 | ||||
-rw-r--r-- | src/init.c | 4 | ||||
-rw-r--r-- | src/options.c | 6 | ||||
-rw-r--r-- | src/os.c | 6 | ||||
-rw-r--r-- | src/page.c | 6 | ||||
-rw-r--r-- | src/random.c | 4 | ||||
-rw-r--r-- | src/region.c | 6 | ||||
-rw-r--r-- | src/segment.c | 6 | ||||
-rw-r--r-- | src/static.c | 4 | ||||
-rw-r--r-- | src/stats.c | 6 |
21 files changed, 63 insertions, 63 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ca2ce3e..453a79c 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 - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - $<INSTALL_INTERFACE:${mi_install_incdir}> - ) + target_include_directories(mimalloc PUBLIC $<INSTALL_INTERFACE:${mi_install_incdir}>) 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 - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - $<INSTALL_INTERFACE:${mi_install_incdir}> - ) + target_include_directories(mimalloc-static PUBLIC $<INSTALL_INTERFACE:${mi_install_incdir}>) 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 - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - $<INSTALL_INTERFACE:${mi_install_incdir}> - ) + target_include_directories(mimalloc-obj PUBLIC $<INSTALL_INTERFACE:${mi_install_incdir}>) # 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 7a9202f..28731d4 100644 --- a/ide/vs2019/mimalloc-override-test.vcxproj +++ b/ide/vs2019/mimalloc-override-test.vcxproj @@ -177,7 +177,8 @@ </PostBuildEvent> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\..\test\main-override.cpp" /> + <ClCompile Include="..\..\test\rtest\src\main.cxx" /> + <ClCompile Include="..\..\test\rtest\src\memory_storage.cxx" /> </ItemGroup> <ItemGroup> <ProjectReference Include="mimalloc-override.vcxproj"> diff --git a/ide/vs2019/mimalloc-override.vcxproj b/ide/vs2019/mimalloc-override.vcxproj index 182ddab..9b703bf 100644 --- a/ide/vs2019/mimalloc-override.vcxproj +++ b/ide/vs2019/mimalloc-override.vcxproj @@ -94,7 +94,8 @@ <Optimization>Disabled</Optimization> <SDLCheck>true</SDLCheck> <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories> + </AdditionalIncludeDirectories> <PreprocessorDefinitions>MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <SupportJustMyCode>false</SupportJustMyCode> @@ -122,7 +123,8 @@ <Optimization>Disabled</Optimization> <SDLCheck>true</SDLCheck> <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories> + </AdditionalIncludeDirectories> <PreprocessorDefinitions>MI_DEBUG=3;MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <SupportJustMyCode>false</SupportJustMyCode> @@ -151,7 +153,8 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories> + </AdditionalIncludeDirectories> <PreprocessorDefinitions>MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions> <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> @@ -183,7 +186,8 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories> + </AdditionalIncludeDirectories> <PreprocessorDefinitions>MI_SHARED_LIB;MI_SHARED_LIB_EXPORT;MI_MALLOC_OVERRIDE;%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions> <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> diff --git a/ide/vs2019/mimalloc.vcxproj b/ide/vs2019/mimalloc.vcxproj index 6c7e276..66cd8d2 100644 --- a/ide/vs2019/mimalloc.vcxproj +++ b/ide/vs2019/mimalloc.vcxproj @@ -96,7 +96,8 @@ <Optimization>Disabled</Optimization> <SDLCheck>true</SDLCheck> <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories> + </AdditionalIncludeDirectories> <PreprocessorDefinitions>MI_DEBUG=3;%(PreprocessorDefinitions);</PreprocessorDefinitions> <CompileAs>CompileAsCpp</CompileAs> <SupportJustMyCode>false</SupportJustMyCode> @@ -115,7 +116,8 @@ <Optimization>Disabled</Optimization> <SDLCheck>true</SDLCheck> <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories> + </AdditionalIncludeDirectories> <PreprocessorDefinitions>MI_DEBUG=3;%(PreprocessorDefinitions);</PreprocessorDefinitions> <CompileAs>CompileAsCpp</CompileAs> <SupportJustMyCode>false</SupportJustMyCode> @@ -142,7 +144,8 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories> + </AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions> <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> @@ -170,7 +173,8 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <ConformanceMode>true</ConformanceMode> - <AdditionalIncludeDirectories>../../include</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories> + </AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions> <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput> <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation> diff --git a/include/mimalloc-types.h b/include/mimalloc-types.h index 18f1623..caf161d 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 <stddef.h> // ptrdiff_t #include <stdint.h> // uintptr_t, uint16_t, etc -#include <mimalloc-atomic.h> // _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 724c0a1..c8a5287 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 <string.h> // memset diff --git a/src/alloc-override-osx.c b/src/alloc-override-osx.c index 3a46ecd..89c8674 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 43931e5..6567c61 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 25cc04e..1d3cd39 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 <string.h> // memset, strlen #include <stdlib.h> // malloc, exit diff --git a/src/arena.c b/src/arena.c index 0e6615a..cb16e19 100644 --- a/src/arena.c +++ b/src/arena.c @@ -25,9 +25,9 @@ blocks of 2GiB (64*32MiB) and no object can cross the boundary. This can lead to fragmentation but fortunately most objects will be regions of 256MiB in practice. -----------------------------------------------------------------------------*/ -#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 <string.h> // memset #include <errno.h> // ENOMEM diff --git a/src/bitmap.c b/src/bitmap.c index 3b5c819..8c835bd 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" /* ----------------------------------------------------------- @@ -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 <string.h> // memset, memcpy @@ -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 <string.h> // memcpy, memset #include <stdlib.h> // atexit diff --git a/src/options.c b/src/options.c index 30025db..41e885e 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 <stdio.h> #include <stdlib.h> // strtol @@ -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 <string.h> // strerror @@ -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 255bede..88d2c89 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 <string.h> // memset diff --git a/src/region.c b/src/region.c index 7954073..53bf5df 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 <string.h> // memset diff --git a/src/segment.c b/src/segment.c index 1d59be9..77f6aa4 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 <string.h> // memset #include <stdio.h> diff --git a/src/static.c b/src/static.c index 4b3abc2..5fe103b 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 c94fbde..a736476 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 <stdio.h> // fputs, stderr #include <string.h> // memset |