From f58357548c9a2b377112174698e400c028cf1910 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Mon, 20 Mar 2023 10:37:39 -0700 Subject: [PATCH 1/5] restructure header files --- ide/vs2022/mimalloc-override.vcxproj | 9 +++++---- ide/vs2022/mimalloc.vcxproj | 9 +++++---- include/{mimalloc-atomic.h => mimalloc/atomic.h} | 0 include/{mimalloc-internal.h => mimalloc/internal.h} | 4 ++-- {src/prim => include/mimalloc}/prim.h | 0 include/{mimalloc-track.h => mimalloc/track.h} | 0 include/{mimalloc-types.h => mimalloc/types.h} | 2 +- src/alloc-aligned.c | 4 ++-- src/alloc-override-osx.c | 2 +- src/alloc-posix.c | 2 +- src/alloc.c | 8 ++++---- src/arena.c | 4 ++-- src/bitmap.c | 2 +- src/heap.c | 7 +++---- src/init.c | 4 ++-- src/options.c | 6 +++--- src/os.c | 6 +++--- src/page.c | 4 ++-- src/prim/unix/prim.c | 6 +++--- src/prim/wasi/prim.c | 6 +++--- src/prim/windows/prim.c | 7 ++++--- src/random.c | 4 ++-- src/region.c | 4 ++-- src/segment.c | 4 ++-- src/static.c | 2 +- src/stats.c | 6 +++--- test/test-api-fill.c | 2 +- test/test-api.c | 4 ++-- 28 files changed, 60 insertions(+), 58 deletions(-) rename include/{mimalloc-atomic.h => mimalloc/atomic.h} (100%) rename include/{mimalloc-internal.h => mimalloc/internal.h} (99%) rename {src/prim => include/mimalloc}/prim.h (100%) rename include/{mimalloc-track.h => mimalloc/track.h} (100%) rename include/{mimalloc-types.h => mimalloc/types.h} (99%) diff --git a/ide/vs2022/mimalloc-override.vcxproj b/ide/vs2022/mimalloc-override.vcxproj index 1eb72952..6eac2fe0 100644 --- a/ide/vs2022/mimalloc-override.vcxproj +++ b/ide/vs2022/mimalloc-override.vcxproj @@ -209,15 +209,16 @@ - - - - + + + + + diff --git a/ide/vs2022/mimalloc.vcxproj b/ide/vs2022/mimalloc.vcxproj index 9e0ffc85..bf8f7d50 100644 --- a/ide/vs2022/mimalloc.vcxproj +++ b/ide/vs2022/mimalloc.vcxproj @@ -241,14 +241,15 @@ - - - - + + + + + diff --git a/include/mimalloc-atomic.h b/include/mimalloc/atomic.h similarity index 100% rename from include/mimalloc-atomic.h rename to include/mimalloc/atomic.h diff --git a/include/mimalloc-internal.h b/include/mimalloc/internal.h similarity index 99% rename from include/mimalloc-internal.h rename to include/mimalloc/internal.h index 33aafa70..51d8aa1e 100644 --- a/include/mimalloc-internal.h +++ b/include/mimalloc/internal.h @@ -8,8 +8,8 @@ terms of the MIT license. A copy of the license can be found in the file #ifndef MIMALLOC_INTERNAL_H #define MIMALLOC_INTERNAL_H -#include "mimalloc-types.h" -#include "mimalloc-track.h" +#include "mimalloc/types.h" +#include "mimalloc/track.h" #if (MI_DEBUG>0) #define mi_trace_message(...) _mi_trace_message(__VA_ARGS__) diff --git a/src/prim/prim.h b/include/mimalloc/prim.h similarity index 100% rename from src/prim/prim.h rename to include/mimalloc/prim.h diff --git a/include/mimalloc-track.h b/include/mimalloc/track.h similarity index 100% rename from include/mimalloc-track.h rename to include/mimalloc/track.h diff --git a/include/mimalloc-types.h b/include/mimalloc/types.h similarity index 99% rename from include/mimalloc-types.h rename to include/mimalloc/types.h index 3577b23a..da4b423f 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 "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 aa9b7bd0..674c74fe 100644 --- a/src/alloc-aligned.c +++ b/src/alloc-aligned.c @@ -6,8 +6,8 @@ terms of the MIT license. A copy of the license can be found in the file -----------------------------------------------------------------------------*/ #include "mimalloc.h" -#include "mimalloc-internal.h" -#include "prim/prim.h" // mi_prim_get_default_heap +#include "mimalloc/internal.h" +#include "mimalloc/prim.h" // mi_prim_get_default_heap #include // memset diff --git a/src/alloc-override-osx.c b/src/alloc-override-osx.c index a2819a8b..a517ddea 100644 --- a/src/alloc-override-osx.c +++ b/src/alloc-override-osx.c @@ -6,7 +6,7 @@ terms of the MIT license. A copy of the license can be found in the file -----------------------------------------------------------------------------*/ #include "mimalloc.h" -#include "mimalloc-internal.h" +#include "mimalloc/internal.h" #if defined(MI_MALLOC_OVERRIDE) diff --git a/src/alloc-posix.c b/src/alloc-posix.c index f0cfe629..b6f09d1a 100644 --- a/src/alloc-posix.c +++ b/src/alloc-posix.c @@ -10,7 +10,7 @@ terms of the MIT license. A copy of the license can be found in the file // for convenience and used when overriding these functions. // ------------------------------------------------------------------------ #include "mimalloc.h" -#include "mimalloc-internal.h" +#include "mimalloc/internal.h" // ------------------------------------------------------ // Posix & Unix functions definitions diff --git a/src/alloc.c b/src/alloc.c index 0bda4db8..301166eb 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -9,9 +9,9 @@ terms of the MIT license. A copy of the license can be found in the file #endif #include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" -#include "prim/prim.h" // _mi_prim_thread_id() +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" +#include "mimalloc/prim.h" // _mi_prim_thread_id() #include // memset, strlen (for mi_strdup) #include // malloc, abort @@ -40,7 +40,7 @@ extern inline void* _mi_page_malloc(mi_heap_t* heap, mi_page_t* page, size_t siz // allow use of the block internally // note: when tracking we need to avoid ever touching the MI_PADDING since - // that is tracked by valgrind etc. as non-accessible (through the red-zone, see `mimalloc-track.h`) + // that is tracked by valgrind etc. as non-accessible (through the red-zone, see `mimalloc/track.h`) mi_track_mem_undefined(block, mi_page_usable_block_size(page)); // zero the block? note: we need to zero the full block size (issue #63) diff --git a/src/arena.c b/src/arena.c index 57f48a73..d8178cc1 100644 --- a/src/arena.c +++ b/src/arena.c @@ -21,8 +21,8 @@ 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 "mimalloc/internal.h" +#include "mimalloc/atomic.h" #include // memset #include // ENOMEM diff --git a/src/bitmap.c b/src/bitmap.c index 9ba994d7..8483de0b 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -18,7 +18,7 @@ between the fields. (This is used in arena allocation) ---------------------------------------------------------------------------- */ #include "mimalloc.h" -#include "mimalloc-internal.h" +#include "mimalloc/internal.h" #include "bitmap.h" /* ----------------------------------------------------------- diff --git a/src/heap.c b/src/heap.c index b12a9962..fea033dc 100644 --- a/src/heap.c +++ b/src/heap.c @@ -6,10 +6,9 @@ terms of the MIT license. A copy of the license can be found in the file -----------------------------------------------------------------------------*/ #include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" -#include "mimalloc-track.h" -#include "prim/prim.h" // mi_prim_get_default_heap +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" +#include "mimalloc/prim.h" // mi_prim_get_default_heap #include // memset, memcpy diff --git a/src/init.c b/src/init.c index 495d26fd..8c5c8049 100644 --- a/src/init.c +++ b/src/init.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 "prim/prim.h" +#include "mimalloc/internal.h" +#include "mimalloc/prim.h" #include // memcpy, memset #include // atexit diff --git a/src/options.c b/src/options.c index f0c52c84..816a2919 100644 --- a/src/options.c +++ b/src/options.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 "prim/prim.h" // mi_prim_out_stderr +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" +#include "mimalloc/prim.h" // mi_prim_out_stderr #include // FILE #include // abort diff --git a/src/os.c b/src/os.c index 85c3652f..d5a3398f 100644 --- a/src/os.c +++ b/src/os.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 "prim/prim.h" +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" +#include "mimalloc/prim.h" /* ----------------------------------------------------------- diff --git a/src/page.c b/src/page.c index 1347c845..e43ba402 100644 --- a/src/page.c +++ b/src/page.c @@ -12,8 +12,8 @@ terms of the MIT license. A copy of the license can be found in the file ----------------------------------------------------------- */ #include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" /* ----------------------------------------------------------- Definition of page queues for each block size diff --git a/src/prim/unix/prim.c b/src/prim/unix/prim.c index 5a3ca5ab..0ac69f1a 100644 --- a/src/prim/unix/prim.c +++ b/src/prim/unix/prim.c @@ -21,9 +21,9 @@ terms of the MIT license. A copy of the license can be found in the file #endif #include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" -#include "../prim.h" +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" +#include "mimalloc/prim.h" #include // mmap #include // sysconf diff --git a/src/prim/wasi/prim.c b/src/prim/wasi/prim.c index f995304f..cb3ce1a7 100644 --- a/src/prim/wasi/prim.c +++ b/src/prim/wasi/prim.c @@ -8,9 +8,9 @@ terms of the MIT license. A copy of the license can be found in the file // This file is included in `src/prim/prim.c` #include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" -#include "../prim.h" +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" +#include "mimalloc/prim.h" //--------------------------------------------- // Initialize diff --git a/src/prim/windows/prim.c b/src/prim/windows/prim.c index 1e15273a..bea1d437 100644 --- a/src/prim/windows/prim.c +++ b/src/prim/windows/prim.c @@ -8,9 +8,9 @@ terms of the MIT license. A copy of the license can be found in the file // This file is included in `src/prim/prim.c` #include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" -#include "../prim.h" +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" +#include "mimalloc/prim.h" #include // strerror #include // fputs, stderr @@ -157,6 +157,7 @@ void _mi_prim_mem_init( mi_os_mem_config_t* config ) //--------------------------------------------- int _mi_prim_free(void* addr, size_t size ) { + MI_UNUSED(size); DWORD errcode = 0; bool err = (VirtualFree(addr, 0, MEM_RELEASE) == 0); if (err) { errcode = GetLastError(); } diff --git a/src/random.c b/src/random.c index 3c8372c8..4fc8b2f8 100644 --- a/src/random.c +++ b/src/random.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 "prim/prim.h" // _mi_prim_random_buf +#include "mimalloc/internal.h" +#include "mimalloc/prim.h" // _mi_prim_random_buf #include // memset /* ---------------------------------------------------------------------------- diff --git a/src/region.c b/src/region.c index 3571abb6..29681f4c 100644 --- a/src/region.c +++ b/src/region.c @@ -32,8 +32,8 @@ Possible issues: do this better without adding too much complexity? -----------------------------------------------------------------------------*/ #include "mimalloc.h" -#include "mimalloc-internal.h" -#include "mimalloc-atomic.h" +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" #include // memset diff --git a/src/segment.c b/src/segment.c index c3cb7155..6cdf4fe7 100644 --- a/src/segment.c +++ b/src/segment.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 "mimalloc-atomic.h" +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" #include // memset #include diff --git a/src/static.c b/src/static.c index 0de72fe3..d0652526 100644 --- a/src/static.c +++ b/src/static.c @@ -14,7 +14,7 @@ terms of the MIT license. A copy of the license can be found in the file #endif #include "mimalloc.h" -#include "mimalloc-internal.h" +#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 8273740f..435a2b38 100644 --- a/src/stats.c +++ b/src/stats.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 "prim/prim.h" +#include "mimalloc/internal.h" +#include "mimalloc/atomic.h" +#include "mimalloc/prim.h" #include // snprintf #include // memset diff --git a/test/test-api-fill.c b/test/test-api-fill.c index 2ad06808..7ba79880 100644 --- a/test/test-api-fill.c +++ b/test/test-api-fill.c @@ -5,7 +5,7 @@ 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-types.h" +#include "mimalloc/types.h" #include "testhelper.h" diff --git a/test/test-api.c b/test/test-api.c index 20050ce8..c78e1972 100644 --- a/test/test-api.c +++ b/test/test-api.c @@ -33,8 +33,8 @@ we therefore test the API over various inputs. Please add more tests :-) #endif #include "mimalloc.h" -// #include "mimalloc-internal.h" -#include "mimalloc-types.h" // for MI_DEBUG and MI_ALIGNMENT_MAX +// #include "mimalloc/internal.h" +#include "mimalloc/types.h" // for MI_DEBUG and MI_ALIGNMENT_MAX #include "testhelper.h" From c0c762611c309e86e31a04778059101fa6536bb0 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Mon, 20 Mar 2023 10:49:56 -0700 Subject: [PATCH 2/5] add prim/osx directory --- CMakeLists.txt | 20 +++++++++---------- .../osx/alloc-override-zone.c} | 0 src/prim/osx/prim.c | 9 +++++++++ src/prim/prim.c | 6 ++++++ src/static.c | 14 ++++++------- 5 files changed, 32 insertions(+), 17 deletions(-) rename src/{alloc-override-osx.c => prim/osx/alloc-override-zone.c} (100%) create mode 100644 src/prim/osx/prim.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 68b7cab4..5c8e55f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,20 +38,20 @@ include(GNUInstallDirs) include("cmake/mimalloc-config-version.cmake") set(mi_sources - src/stats.c - src/random.c - src/os.c - src/bitmap.c - src/arena.c - src/region.c - src/segment.c - src/page.c src/alloc.c src/alloc-aligned.c src/alloc-posix.c + src/arena.c + src/bitmap.c src/heap.c - src/options.c src/init.c + src/options.c + src/os.c + src/page.c + src/random.c + src/region.c + src/segment.c + src/stats.c src/prim/prim.c) set(mi_cflags "") @@ -92,7 +92,7 @@ if(MI_OVERRIDE) if(MI_OSX_ZONE) # 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_sources src/prim/osx/alloc-override-zone.c) list(APPEND mi_defines MI_OSX_ZONE=1) if (NOT MI_OSX_INTERPOSE) message(STATUS " WARNING: zone overriding usually also needs interpose (use -DMI_OSX_INTERPOSE=ON)") diff --git a/src/alloc-override-osx.c b/src/prim/osx/alloc-override-zone.c similarity index 100% rename from src/alloc-override-osx.c rename to src/prim/osx/alloc-override-zone.c diff --git a/src/prim/osx/prim.c b/src/prim/osx/prim.c new file mode 100644 index 00000000..8a2f4e8a --- /dev/null +++ b/src/prim/osx/prim.c @@ -0,0 +1,9 @@ +/* ---------------------------------------------------------------------------- +Copyright (c) 2018-2023, Microsoft Research, Daan Leijen +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. +-----------------------------------------------------------------------------*/ + +// We use the unix/prim.c with the mmap API on macOSX +#include "../unix/prim.c" diff --git a/src/prim/prim.c b/src/prim/prim.c index 109ab8e8..9a597d8e 100644 --- a/src/prim/prim.c +++ b/src/prim/prim.c @@ -10,9 +10,15 @@ terms of the MIT license. A copy of the license can be found in the file #if defined(_WIN32) #include "windows/prim.c" // VirtualAlloc (Windows) + +#elif defined(__APPLE__) +#include "osx/prim.c" // macOSX (actually defers to mmap in unix/prim.c) + #elif defined(__wasi__) #define MI_USE_SBRK #include "wasi/prim.c" // memory-grow or sbrk (Wasm) + #else #include "unix/prim.c" // mmap() (Linux, macOSX, BSD, Illumnos, Haiku, DragonFly, etc.) + #endif diff --git a/src/static.c b/src/static.c index d0652526..090f0c25 100644 --- a/src/static.c +++ b/src/static.c @@ -20,11 +20,8 @@ terms of the MIT license. A copy of the license can be found in the file // containing the whole library. If it is linked first // it will override all the standard library allocation // functions (on Unix's). -#include "alloc.c" +#include "alloc.c" // includes alloc-override.c #include "alloc-aligned.c" -#if MI_OSX_ZONE -#include "alloc-override-osx.c" -#endif #include "alloc-posix.c" #include "arena.c" #include "bitmap.c" @@ -32,9 +29,12 @@ terms of the MIT license. A copy of the license can be found in the file #include "init.c" #include "options.c" #include "os.c" -#include "page.c" -#include "prim/prim.c" -#include "random.c" +#include "page.c" // includes page-queue.c +#include "random.c" #include "region.c" #include "segment.c" #include "stats.c" +#include "prim/prim.c" +#if MI_OSX_ZONE +#include "prim/osx/alloc-override-zone.c" +#endif From ec5f4904b0762639fe938e1d906527f763e4df77 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Mon, 20 Mar 2023 11:01:40 -0700 Subject: [PATCH 3/5] more comments --- include/mimalloc/internal.h | 6 ++++++ include/mimalloc/prim.h | 7 +++++++ include/mimalloc/types.h | 11 +++++++++++ 3 files changed, 24 insertions(+) diff --git a/include/mimalloc/internal.h b/include/mimalloc/internal.h index 51d8aa1e..791eeb99 100644 --- a/include/mimalloc/internal.h +++ b/include/mimalloc/internal.h @@ -8,6 +8,12 @@ terms of the MIT license. A copy of the license can be found in the file #ifndef MIMALLOC_INTERNAL_H #define MIMALLOC_INTERNAL_H + +// -------------------------------------------------------------------------- +// This file contains the interal API's of mimalloc and various utility +// functions and macros. +// -------------------------------------------------------------------------- + #include "mimalloc/types.h" #include "mimalloc/track.h" diff --git a/include/mimalloc/prim.h b/include/mimalloc/prim.h index 1a4fb5d8..97d8b45d 100644 --- a/include/mimalloc/prim.h +++ b/include/mimalloc/prim.h @@ -8,10 +8,17 @@ terms of the MIT license. A copy of the license can be found in the file #ifndef MIMALLOC_PRIM_H #define MIMALLOC_PRIM_H + +// -------------------------------------------------------------------------- +// This file specifies the primitive portability API. +// Each OS/host needs to implement these primitives, see `src/prim` +// for implementations on Window, macOS, WASI, and Linux/Unix. +// // note: on all primitive functions, we always get: // addr != NULL and page aligned // size > 0 and page aligned // return value is an error code an int where 0 is success. +// -------------------------------------------------------------------------- // OS memory configuration typedef struct mi_os_mem_config_s { diff --git a/include/mimalloc/types.h b/include/mimalloc/types.h index da4b423f..90b7b3e4 100644 --- a/include/mimalloc/types.h +++ b/include/mimalloc/types.h @@ -8,6 +8,17 @@ terms of the MIT license. A copy of the license can be found in the file #ifndef MIMALLOC_TYPES_H #define MIMALLOC_TYPES_H +// -------------------------------------------------------------------------- +// This file contains the main type definitions for mimalloc: +// mi_heap_t : all data for a thread-local heap, contains +// lists of all managed heap pages. +// mi_segment_t : a larger chunk of memory (32GiB) from where pages +// are allocated. +// mi_page_t : a mimalloc page (usually 64KiB or 512KiB) from +// where objects are allocated. +// -------------------------------------------------------------------------- + + #include // ptrdiff_t #include // uintptr_t, uint16_t, etc #include "mimalloc/atomic.h" // _Atomic From 0509d11ac55f28ddd4784fcd1a3f5e42238bbd41 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Mon, 20 Mar 2023 11:02:16 -0700 Subject: [PATCH 4/5] more comments --- include/mimalloc/internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/mimalloc/internal.h b/include/mimalloc/internal.h index 791eeb99..3ee20151 100644 --- a/include/mimalloc/internal.h +++ b/include/mimalloc/internal.h @@ -50,6 +50,7 @@ terms of the MIT license. A copy of the license can be found in the file #define mi_decl_externc #endif +// pthreads #if !defined(_WIN32) && !defined(__wasi__) #define MI_USE_PTHREADS #include From e24e1125eea4102542f0afcabbe58b01acfd5e7a Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Mon, 20 Mar 2023 11:03:50 -0700 Subject: [PATCH 5/5] bump version to 1.8.0 --- cmake/mimalloc-config-version.cmake | 4 ++-- include/mimalloc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/mimalloc-config-version.cmake b/cmake/mimalloc-config-version.cmake index dbe8fdaa..1141128c 100644 --- a/cmake/mimalloc-config-version.cmake +++ b/cmake/mimalloc-config-version.cmake @@ -1,6 +1,6 @@ set(mi_version_major 1) -set(mi_version_minor 7) -set(mi_version_patch 9) +set(mi_version_minor 8) +set(mi_version_patch 0) set(mi_version ${mi_version_major}.${mi_version_minor}) set(PACKAGE_VERSION ${mi_version}) diff --git a/include/mimalloc.h b/include/mimalloc.h index 4fc7a752..66545a8c 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -8,7 +8,7 @@ terms of the MIT license. A copy of the license can be found in the file #ifndef MIMALLOC_H #define MIMALLOC_H -#define MI_MALLOC_VERSION 179 // major + 2 digits minor +#define MI_MALLOC_VERSION 180 // major + 2 digits minor // ------------------------------------------------------ // Compiler specific attributes