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"