diff --git a/build.bat b/build.bat index 13a11d218..6ccbbc8b6 100644 --- a/build.bat +++ b/build.bat @@ -105,7 +105,7 @@ set linker_settings=%libs% %linker_flags% del *.pdb > NUL 2> NUL del *.ilk > NUL 2> NUL -cl %compiler_settings% "src\mimalloc\src\static.c" "src\main.cpp" "src\libtommath.cpp" /link %linker_settings% -OUT:%exe_name% +cl %compiler_settings% "src\mimalloc\static.c" "src\main.cpp" "src\libtommath.cpp" /link %linker_settings% -OUT:%exe_name% if %errorlevel% neq 0 goto end_of_build call build_vendor.bat diff --git a/build_odin.sh b/build_odin.sh index 2fc30c067..dbd78dbd2 100755 --- a/build_odin.sh +++ b/build_odin.sh @@ -114,7 +114,7 @@ build_odin() { esac set -x - $CXX src/mimalloc/src/static.c src/libtommath.cpp src/main.cpp $DISABLED_WARNINGS $CPPFLAGS $CXXFLAGS $EXTRAFLAGS $LDFLAGS -o odin + $CXX src/mimalloc/static.c src/libtommath.cpp src/main.cpp $DISABLED_WARNINGS $CPPFLAGS $CXXFLAGS $EXTRAFLAGS $LDFLAGS -o odin set +x } diff --git a/src/mimalloc/LICENSE b/src/mimalloc/LICENSE new file mode 100644 index 000000000..670b668a0 --- /dev/null +++ b/src/mimalloc/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018-2021 Microsoft Corporation, Daan Leijen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/mimalloc/src/alloc-aligned.c b/src/mimalloc/alloc-aligned.c similarity index 100% rename from src/mimalloc/src/alloc-aligned.c rename to src/mimalloc/alloc-aligned.c diff --git a/src/mimalloc/src/alloc-override.c b/src/mimalloc/alloc-override.c similarity index 100% rename from src/mimalloc/src/alloc-override.c rename to src/mimalloc/alloc-override.c diff --git a/src/mimalloc/src/alloc-posix.c b/src/mimalloc/alloc-posix.c similarity index 100% rename from src/mimalloc/src/alloc-posix.c rename to src/mimalloc/alloc-posix.c diff --git a/src/mimalloc/src/alloc.c b/src/mimalloc/alloc.c similarity index 100% rename from src/mimalloc/src/alloc.c rename to src/mimalloc/alloc.c diff --git a/src/mimalloc/src/arena.c b/src/mimalloc/arena.c similarity index 100% rename from src/mimalloc/src/arena.c rename to src/mimalloc/arena.c diff --git a/src/mimalloc/src/bitmap.c b/src/mimalloc/bitmap.c similarity index 100% rename from src/mimalloc/src/bitmap.c rename to src/mimalloc/bitmap.c diff --git a/src/mimalloc/src/bitmap.h b/src/mimalloc/bitmap.h similarity index 100% rename from src/mimalloc/src/bitmap.h rename to src/mimalloc/bitmap.h diff --git a/src/mimalloc/src/heap.c b/src/mimalloc/heap.c similarity index 100% rename from src/mimalloc/src/heap.c rename to src/mimalloc/heap.c diff --git a/src/mimalloc/src/init.c b/src/mimalloc/init.c similarity index 100% rename from src/mimalloc/src/init.c rename to src/mimalloc/init.c diff --git a/src/mimalloc/src/options.c b/src/mimalloc/options.c similarity index 100% rename from src/mimalloc/src/options.c rename to src/mimalloc/options.c diff --git a/src/mimalloc/src/os.c b/src/mimalloc/os.c similarity index 100% rename from src/mimalloc/src/os.c rename to src/mimalloc/os.c diff --git a/src/mimalloc/src/page-queue.c b/src/mimalloc/page-queue.c similarity index 100% rename from src/mimalloc/src/page-queue.c rename to src/mimalloc/page-queue.c diff --git a/src/mimalloc/src/page.c b/src/mimalloc/page.c similarity index 100% rename from src/mimalloc/src/page.c rename to src/mimalloc/page.c diff --git a/src/mimalloc/src/prim/osx/alloc-override-zone.c b/src/mimalloc/prim/osx/alloc-override-zone.c similarity index 100% rename from src/mimalloc/src/prim/osx/alloc-override-zone.c rename to src/mimalloc/prim/osx/alloc-override-zone.c diff --git a/src/mimalloc/src/prim/osx/prim.c b/src/mimalloc/prim/osx/prim.c similarity index 100% rename from src/mimalloc/src/prim/osx/prim.c rename to src/mimalloc/prim/osx/prim.c diff --git a/src/mimalloc/src/prim/prim.c b/src/mimalloc/prim/prim.c similarity index 100% rename from src/mimalloc/src/prim/prim.c rename to src/mimalloc/prim/prim.c diff --git a/src/mimalloc/src/prim/readme.md b/src/mimalloc/prim/readme.md similarity index 100% rename from src/mimalloc/src/prim/readme.md rename to src/mimalloc/prim/readme.md diff --git a/src/mimalloc/src/prim/unix/prim.c b/src/mimalloc/prim/unix/prim.c similarity index 100% rename from src/mimalloc/src/prim/unix/prim.c rename to src/mimalloc/prim/unix/prim.c diff --git a/src/mimalloc/src/prim/wasi/prim.c b/src/mimalloc/prim/wasi/prim.c similarity index 100% rename from src/mimalloc/src/prim/wasi/prim.c rename to src/mimalloc/prim/wasi/prim.c diff --git a/src/mimalloc/src/prim/windows/etw-mimalloc.wprp b/src/mimalloc/prim/windows/etw-mimalloc.wprp similarity index 100% rename from src/mimalloc/src/prim/windows/etw-mimalloc.wprp rename to src/mimalloc/prim/windows/etw-mimalloc.wprp diff --git a/src/mimalloc/src/prim/windows/etw.h b/src/mimalloc/prim/windows/etw.h similarity index 100% rename from src/mimalloc/src/prim/windows/etw.h rename to src/mimalloc/prim/windows/etw.h diff --git a/src/mimalloc/src/prim/windows/etw.man b/src/mimalloc/prim/windows/etw.man similarity index 100% rename from src/mimalloc/src/prim/windows/etw.man rename to src/mimalloc/prim/windows/etw.man diff --git a/src/mimalloc/src/prim/windows/prim.c b/src/mimalloc/prim/windows/prim.c similarity index 100% rename from src/mimalloc/src/prim/windows/prim.c rename to src/mimalloc/prim/windows/prim.c diff --git a/src/mimalloc/src/prim/windows/readme.md b/src/mimalloc/prim/windows/readme.md similarity index 100% rename from src/mimalloc/src/prim/windows/readme.md rename to src/mimalloc/prim/windows/readme.md diff --git a/src/mimalloc/src/random.c b/src/mimalloc/random.c similarity index 100% rename from src/mimalloc/src/random.c rename to src/mimalloc/random.c diff --git a/src/mimalloc/src/segment-map.c b/src/mimalloc/segment-map.c similarity index 100% rename from src/mimalloc/src/segment-map.c rename to src/mimalloc/segment-map.c diff --git a/src/mimalloc/src/segment.c b/src/mimalloc/segment.c similarity index 100% rename from src/mimalloc/src/segment.c rename to src/mimalloc/segment.c diff --git a/src/mimalloc/src/static.c b/src/mimalloc/static.c similarity index 100% rename from src/mimalloc/src/static.c rename to src/mimalloc/static.c diff --git a/src/mimalloc/src/stats.c b/src/mimalloc/stats.c similarity index 100% rename from src/mimalloc/src/stats.c rename to src/mimalloc/stats.c