From 1b590c2517fef110564943ed8a10edd11fa758b0 Mon Sep 17 00:00:00 2001 From: vnugent Date: Wed, 22 May 2024 17:49:57 -0400 Subject: Squashed commit of the following: commit 9a835fe12c9586ab8dd44d7c96fef4a2d6017e4b Author: vnugent Date: Fri May 17 18:27:03 2024 -0400 chore: Update mimmaloc v2.1.6, update fPIC & cleanup commit 3b7004b88acfc7f7baa3a8857a5a2f7cf3dd560e Author: vnugent Date: Fri May 17 16:03:28 2024 -0400 feat: Added ReadFileDataAsync function commit 9a964795757bf0da4dd7fcab15ad304f4ea3fdf1 Author: vnugent Date: Wed May 15 21:57:39 2024 -0400 refactor: Harden some argon2 password hashing commit 4035c838c1508af0aa7e767a97431a692958ce1c Author: vnugent Date: Sun May 12 16:55:32 2024 -0400 perf: Utils + http perf mods commit f4f0d4f74250257991c57bfae74c4852c7e1ae46 Author: vnugent Date: Thu May 2 15:22:53 2024 -0400 feat: Buff middleware handlers | | Added implicit support for middleware post processing of files before the filehandler closes the connection. Also cleaned up some project file stuff commit f0b7dca107659df1d7d4631fdbd2aae9d716d053 Merge: 8c4a45e 107b058 Author: vnugent Date: Sat Apr 20 12:24:05 2024 -0400 Merge branch 'main' into develop commit 8c4a45e384accf92b1b6d748530e8d46f7de40d6 Author: vnugent Date: Sat Apr 20 11:10:30 2024 -0400 refactor: Overhaul C libraries and fix builds commit 42ff77080d10b0fc9fecbbc46141e8e23a1d066a Author: vnugent Date: Sat Apr 20 00:45:57 2024 -0400 fix!: Middlware array, multiple cookie set, and cookie check commit 97e82b9d66f387f9e6d21d88ddc7a8ab8693149c Merge: 4ca5791 e07537a Author: vnugent Date: Tue Apr 2 13:34:22 2024 -0400 Merge branch 'main' into develop commit 4ca5791ed67b9834bdbd010206b30373e4705e9b Author: vnugent Date: Tue Apr 2 13:32:12 2024 -0400 fix: Missed ! on null pointer check commit 9b4036377c52200c6488c98180d69a0e63321f97 Author: vnugent Date: Tue Apr 2 13:22:29 2024 -0400 fix: Fix _In_ macro for compression public api commit 53a7b4b5c5b67b4a4e06e1d9098cac4bcd6afd7c Merge: 448a93b 21130c8 Author: vnugent Date: Sun Mar 31 17:01:15 2024 -0400 Merge branch 'main' into develop commit 448a93bb1d18d032087afe2476ffccb98634a54c Author: vnugent Date: Sun Mar 31 16:56:51 2024 -0400 ci: fix third-party dir cleanup commit 9afed1427472da1ea13079f98dbe27339e55ee7d Author: vnugent Date: Sun Mar 31 16:43:15 2024 -0400 perf: Deprecate unsafememoryhandle span extensions commit 3ff90da4f02af47ea6d233fdd4445337ebe36452 Author: vnugent Date: Sat Mar 30 21:36:18 2024 -0400 refactor: Updates, advanced tracing, http optimizations commit 8d6b79b5ae309b36f265ba81529bcef8bfcd7414 Merge: 6c1667b 5585915 Author: vnugent Date: Sun Mar 24 21:01:31 2024 -0400 Merge branch 'main' into develop commit 6c1667be23597513537f8190e2f55d65eb9b7c7a Author: vnugent Date: Fri Mar 22 12:01:53 2024 -0400 refactor: Overhauled native library loading and lazy init commit ebf688f2f974295beabf7b5def7e6f6f150551d0 Author: vnugent Date: Wed Mar 20 22:16:17 2024 -0400 refactor: Update compression header files and macros + Ci build commit 9c7b564911080ccd5cbbb9851a0757b05e1e9047 Author: vnugent Date: Tue Mar 19 21:54:49 2024 -0400 refactor: JWK overhaul & add length getter to FileUpload commit 6d8c3444e09561e5957491b3cc1ae858e0abdd14 Author: vnugent Date: Mon Mar 18 16:13:20 2024 -0400 feat: Add FNV1a software checksum and basic correction tests commit 00d182088cecefc08ca80b1faee9bed3f215f40b Author: vnugent Date: Fri Mar 15 01:05:27 2024 -0400 chore: #6 Use utils filewatcher instead of built-in commit d513c10d9895c6693519ef1d459c6a5a76929436 Author: vnugent Date: Sun Mar 10 21:58:14 2024 -0400 source tree project location updated --- Module.Taskfile.yaml | 8 +- Taskfile.yaml | 11 + .../src/Argon2/Argon2PasswordEntry.cs | 45 +- lib/Hashing.Portable/src/Argon2/VnArgon2.cs | 250 +- .../src/VNLib.Hashing.Portable.csproj | 11 +- lib/Hashing.Portable/tests/ManagedHashTests.cs | 27 +- .../VNLib.Net.Compression.csproj | 8 +- lib/Net.Compression/vnlib_compress/CMakeLists.txt | 52 +- lib/Net.Compression/vnlib_compress/Taskfile.yaml | 2 +- lib/Net.Http/src/Core/ConnectionInfo.cs | 26 +- lib/Net.Http/src/Core/HttpCookie.cs | 121 - lib/Net.Http/src/Core/HttpServerProcessing.cs | 18 +- lib/Net.Http/src/Core/IHttpContextInformation.cs | 3 +- .../src/Core/PerfCounter/HttpPerfCounter.cs | 76 + .../src/Core/PerfCounter/HttpPerfCounterState.cs | 32 + lib/Net.Http/src/Core/Request/HttpRequest.cs | 7 +- .../Core/Response/HttpContextResponseWriting.cs | 2 +- lib/Net.Http/src/Core/Response/HttpResponse.cs | 30 +- .../src/Core/Response/ResponsBodyDataState.cs | 6 +- lib/Net.Http/src/Core/Response/ResponseWriter.cs | 27 +- lib/Net.Http/src/Helpers/HttpControlMask.cs | 4 +- lib/Net.Http/src/Helpers/HttpHelpers.cs | 14 +- lib/Net.Http/src/HttpConfig.cs | 7 +- lib/Net.Http/src/HttpResponseCookie.cs | 226 ++ lib/Net.Http/src/IConnectionInfo.cs | 11 +- lib/Net.Http/src/VNLib.Net.Http.csproj | 7 +- lib/Net.Messaging.FBM/src/Client/FBMRequest.cs | 4 +- .../src/VNLib.Net.Messaging.FBM.csproj | 7 +- lib/Net.Rest.Client/src/Construction/Extensions.cs | 98 +- .../src/VNLib.Net.Rest.Client.csproj | 5 +- .../src/SocketPipeLineWorker.cs | 12 +- .../src/VNLib.Net.Transport.SimpleTCP.csproj | 7 +- .../VNLib.Plugins.Essentials.ServiceStack.csproj | 9 +- .../src/Accounts/PasswordHashing.cs | 100 +- .../src/Endpoints/SemiConsistentVeTable.cs | 187 ++ lib/Plugins.Essentials/src/EventProcessor.cs | 37 +- lib/Plugins.Essentials/src/EventProcessorConfig.cs | 1 + .../src/Extensions/ConnectionInfoExtensions.cs | 131 +- .../src/Extensions/EssentialHttpEventExtensions.cs | 64 +- .../src/Extensions/HttpCookie.cs | 3 +- .../src/Extensions/SingleCookieController.cs | 18 +- lib/Plugins.Essentials/src/HttpEntity.cs | 54 + .../src/Middleware/IHttpMiddleware.cs | 16 +- .../src/Middleware/MiddlewareController.cs | 88 + .../src/Oauth/OauthHttpExtensions.cs | 24 +- .../src/SemiConsistentVeTable.cs | 188 -- .../src/VNLib.Plugins.Essentials.csproj | 8 +- .../src/VNLib.Plugins.PluginBase.csproj | 6 +- .../src/VNLib.Plugins.Runtime.csproj | 7 +- lib/Plugins/src/VNLib.Plugins.csproj | 7 +- lib/Utils.Memory/vnlib_mimalloc/CMakeLists.txt | 69 +- lib/Utils.Memory/vnlib_mimalloc/Taskfile.yaml | 6 +- .../vnlib_mimalloc/vendor/.gitattributes | 1 + .../vnlib_mimalloc/vendor/CMakeLists.txt | 71 +- lib/Utils.Memory/vnlib_mimalloc/vendor/SECURITY.md | 16 +- .../vendor/cmake/mimalloc-config-version.cmake | 2 +- .../bench-2020/bench-c5-18xlarge-2020-01-20-a.svg | 887 ------- .../bench-2020/bench-c5-18xlarge-2020-01-20-b.svg | 1185 --------- .../bench-c5-18xlarge-2020-01-20-rss-a.svg | 757 ------ .../bench-c5-18xlarge-2020-01-20-rss-b.svg | 1028 -------- .../vendor/doc/bench-2020/bench-r5a-1.svg | 769 ------ .../bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg | 868 ------- .../bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg | 1157 --------- .../vendor/doc/bench-2020/bench-r5a-2.svg | 983 -------- .../vendor/doc/bench-2020/bench-r5a-rss-1.svg | 683 ----- .../vendor/doc/bench-2020/bench-r5a-rss-2.svg | 854 ------- .../vendor/doc/bench-2020/bench-spec-rss.svg | 713 ------ .../vendor/doc/bench-2020/bench-spec.svg | 713 ------ .../vendor/doc/bench-2020/bench-z4-1.svg | 890 ------- .../vendor/doc/bench-2020/bench-z4-2.svg | 1146 --------- .../vendor/doc/bench-2020/bench-z4-rss-1.svg | 796 ------ .../vendor/doc/bench-2020/bench-z4-rss-2.svg | 974 ------- .../doc/bench-2021/bench-amd5950x-2021-01-30-a.svg | 952 ------- .../doc/bench-2021/bench-amd5950x-2021-01-30-b.svg | 1255 --------- .../bench-2021/bench-c5-18xlarge-2021-01-30-a.svg | 955 ------- .../bench-2021/bench-c5-18xlarge-2021-01-30-b.svg | 1269 ---------- .../bench-c5-18xlarge-2021-01-30-rss-a.svg | 836 ------ .../bench-c5-18xlarge-2021-01-30-rss-b.svg | 1131 --------- .../doc/bench-2021/bench-macmini-2021-01-30.svg | 766 ------ .../vnlib_mimalloc/vendor/doc/doxyfile | 2659 -------------------- .../vnlib_mimalloc/vendor/doc/ds-logo.jpg | Bin 181497 -> 0 bytes .../vnlib_mimalloc/vendor/doc/ds-logo.png | Bin 121150 -> 0 bytes .../vnlib_mimalloc/vendor/doc/mimalloc-doc.h | 1281 ---------- .../vnlib_mimalloc/vendor/doc/mimalloc-doxygen.css | 49 - .../vendor/doc/mimalloc-logo-100.png | Bin 3532 -> 0 bytes .../vnlib_mimalloc/vendor/doc/mimalloc-logo.png | Bin 73097 -> 0 bytes .../vnlib_mimalloc/vendor/doc/mimalloc-logo.svg | 161 -- .../vnlib_mimalloc/vendor/doc/spades-logo.png | Bin 34583 -> 0 bytes .../vnlib_mimalloc/vendor/doc/unreal-logo.svg | 43 - .../ide/vs2017/mimalloc-override-test.vcxproj | 190 -- .../vendor/ide/vs2017/mimalloc-override.vcxproj | 259 -- .../vendor/ide/vs2017/mimalloc-test-stress.vcxproj | 159 -- .../vendor/ide/vs2017/mimalloc-test.vcxproj | 158 -- .../vnlib_mimalloc/vendor/ide/vs2017/mimalloc.sln | 71 - .../vendor/ide/vs2017/mimalloc.vcxproj | 259 -- .../ide/vs2019/mimalloc-override-test.vcxproj | 190 -- .../vendor/ide/vs2019/mimalloc-override.vcxproj | 259 -- .../vendor/ide/vs2019/mimalloc-test-api.vcxproj | 155 -- .../vendor/ide/vs2019/mimalloc-test-stress.vcxproj | 159 -- .../vendor/ide/vs2019/mimalloc-test.vcxproj | 158 -- .../vnlib_mimalloc/vendor/ide/vs2019/mimalloc.sln | 81 - .../vendor/ide/vs2019/mimalloc.vcxproj | 257 -- .../ide/vs2022/mimalloc-override-test.vcxproj | 190 -- .../vendor/ide/vs2022/mimalloc-override.vcxproj | 270 -- .../vendor/ide/vs2022/mimalloc-test-api.vcxproj | 162 -- .../vendor/ide/vs2022/mimalloc-test-stress.vcxproj | 159 -- .../vendor/ide/vs2022/mimalloc-test.vcxproj | 158 -- .../vnlib_mimalloc/vendor/ide/vs2022/mimalloc.sln | 81 - .../vendor/ide/vs2022/mimalloc.vcxproj | 257 -- .../vnlib_mimalloc/vendor/include/mimalloc.h | 63 +- .../vendor/include/mimalloc/atomic.h | 14 +- .../vendor/include/mimalloc/internal.h | 89 +- .../vnlib_mimalloc/vendor/include/mimalloc/prim.h | 103 +- .../vnlib_mimalloc/vendor/include/mimalloc/track.h | 2 + .../vnlib_mimalloc/vendor/include/mimalloc/types.h | 169 +- lib/Utils.Memory/vnlib_mimalloc/vendor/readme.md | 115 +- .../vnlib_mimalloc/vendor/src/alloc-aligned.c | 136 +- .../vnlib_mimalloc/vendor/src/alloc-override.c | 27 +- lib/Utils.Memory/vnlib_mimalloc/vendor/src/alloc.c | 582 +---- lib/Utils.Memory/vnlib_mimalloc/vendor/src/arena.c | 356 ++- .../vnlib_mimalloc/vendor/src/bitmap.c | 14 +- .../vnlib_mimalloc/vendor/src/bitmap.h | 4 +- lib/Utils.Memory/vnlib_mimalloc/vendor/src/free.c | 530 ++++ lib/Utils.Memory/vnlib_mimalloc/vendor/src/heap.c | 35 +- lib/Utils.Memory/vnlib_mimalloc/vendor/src/init.c | 53 +- lib/Utils.Memory/vnlib_mimalloc/vendor/src/libc.c | 273 ++ .../vnlib_mimalloc/vendor/src/options.c | 92 +- lib/Utils.Memory/vnlib_mimalloc/vendor/src/os.c | 79 +- .../vnlib_mimalloc/vendor/src/page-queue.c | 55 +- lib/Utils.Memory/vnlib_mimalloc/vendor/src/page.c | 110 +- .../vendor/src/prim/emscripten/prim.c | 244 ++ .../vendor/src/prim/osx/alloc-override-zone.c | 2 + .../vnlib_mimalloc/vendor/src/prim/prim.c | 3 + .../vnlib_mimalloc/vendor/src/prim/unix/prim.c | 80 +- .../vnlib_mimalloc/vendor/src/prim/wasi/prim.c | 5 + .../vnlib_mimalloc/vendor/src/prim/windows/prim.c | 2 +- .../vnlib_mimalloc/vendor/src/segment-map.c | 8 +- .../vnlib_mimalloc/vendor/src/segment.c | 543 ++-- .../vnlib_mimalloc/vendor/src/static.c | 1 + lib/Utils.Memory/vnlib_mimalloc/vendor/src/stats.c | 60 +- .../vnlib_mimalloc/vendor/test/main-override.cpp | 4 +- .../vnlib_mimalloc/vendor/test/test-api.c | 108 +- .../vnlib_mimalloc/vendor/test/test-stress.c | 21 +- lib/Utils.Memory/vnlib_rpmalloc/CMakeLists.txt | 59 +- lib/Utils.Memory/vnlib_rpmalloc/Taskfile.yaml | 16 +- lib/Utils/src/Extensions/MemoryExtensions.cs | 70 +- lib/Utils/src/Extensions/StringExtensions.cs | 6 +- lib/Utils/src/Memory/ForwardOnlyWriter.cs | 108 +- lib/Utils/src/Memory/IUnmangedHeap.cs | 7 +- lib/Utils/src/Memory/MemoryUtil.CopyUtilCore.cs | 5 +- lib/Utils/src/Memory/NativeHeap.cs | 4 +- lib/Utils/src/Memory/UnmanagedHeapBase.cs | 2 +- lib/Utils/src/VNLib.Utils.csproj | 7 +- vnlib.core.build.sln | 33 + 154 files changed, 4158 insertions(+), 31810 deletions(-) delete mode 100644 lib/Net.Http/src/Core/HttpCookie.cs create mode 100644 lib/Net.Http/src/Core/PerfCounter/HttpPerfCounter.cs create mode 100644 lib/Net.Http/src/Core/PerfCounter/HttpPerfCounterState.cs create mode 100644 lib/Net.Http/src/HttpResponseCookie.cs create mode 100644 lib/Plugins.Essentials/src/Endpoints/SemiConsistentVeTable.cs create mode 100644 lib/Plugins.Essentials/src/Middleware/MiddlewareController.cs delete mode 100644 lib/Plugins.Essentials/src/SemiConsistentVeTable.cs delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-1.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-2.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-rss-1.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-rss-2.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-spec-rss.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-spec.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-1.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-2.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-rss-1.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-rss-2.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-amd5950x-2021-01-30-a.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-amd5950x-2021-01-30-b.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-macmini-2021-01-30.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/doxyfile delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/ds-logo.jpg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/ds-logo.png delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/mimalloc-doc.h delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/mimalloc-doxygen.css delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/mimalloc-logo-100.png delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/mimalloc-logo.png delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/mimalloc-logo.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/spades-logo.png delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/doc/unreal-logo.svg delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2017/mimalloc-override-test.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2017/mimalloc-override.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2017/mimalloc-test-stress.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2017/mimalloc-test.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2017/mimalloc.sln delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2017/mimalloc.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2019/mimalloc-override-test.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2019/mimalloc-override.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2019/mimalloc-test-api.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2019/mimalloc-test-stress.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2019/mimalloc-test.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2019/mimalloc.sln delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2019/mimalloc.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2022/mimalloc-override-test.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2022/mimalloc-override.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2022/mimalloc-test-api.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2022/mimalloc-test-stress.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2022/mimalloc-test.vcxproj delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2022/mimalloc.sln delete mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/ide/vs2022/mimalloc.vcxproj create mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/src/free.c create mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/src/libc.c create mode 100644 lib/Utils.Memory/vnlib_mimalloc/vendor/src/prim/emscripten/prim.c diff --git a/Module.Taskfile.yaml b/Module.Taskfile.yaml index c604ff8..8d81b0e 100644 --- a/Module.Taskfile.yaml +++ b/Module.Taskfile.yaml @@ -43,6 +43,10 @@ tasks: - sleet push "{{.PACK_OUT}}/debug/" --source debug --config "{{.SLEET_CONFIG_PATH}}" --force - sleet push "{{.PACK_OUT}}/release/" --source release --config "{{.SLEET_CONFIG_PATH}}" --force + test: + cmds: + - cmd: dotnet test --verbosity normal + #called by build pipeline to clean module clean: cmds: @@ -57,11 +61,11 @@ tasks: internal: true cmds: - dotnet publish -c debug {{.MS_ARGS}} - - dotnet pack -c debug {{.MS_ARGS}} -o "{{.PACK_OUT}}/debug/" + - dotnet pack -c debug {{.MS_ARGS}} -o "{{.PACK_OUT}}/debug/" -p:PackageVersion={{.BUILD_VERSION}} build_release: internal: true cmds: - dotnet publish -c release {{.MS_ARGS}} - - dotnet pack -c release {{.MS_ARGS}} -o "{{.PACK_OUT}}/release/" + - dotnet pack -c release {{.MS_ARGS}} -o "{{.PACK_OUT}}/release/" -p:PackageVersion={{.BUILD_VERSION}} \ No newline at end of file diff --git a/Taskfile.yaml b/Taskfile.yaml index bd45655..0d73872 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -14,6 +14,17 @@ vars: RELEASE_DIR: "./bin/release/{{.TARGET_FRAMEWORK}}/publish" tasks: + + dev-setup: + desc: 'Sets up all native libraries for local development' + cmds: + #build native libs for development + - cd lib/Utils.Memory/vnlib_rpmalloc && task build + - cd lib/Utils.Memory/vnlib_mimalloc && task build + - cd lib/Utils.Cryptography/monocypher && task build + - cd lib/Utils.Cryptography/argon2 && task build + - cd lib/Net.Compression/vnlib_compress && task build + - echo "dev setup complete" #when build succeeds, archive the output into a tgz postbuild_success: diff --git a/lib/Hashing.Portable/src/Argon2/Argon2PasswordEntry.cs b/lib/Hashing.Portable/src/Argon2/Argon2PasswordEntry.cs index f99d0dc..e195526 100644 --- a/lib/Hashing.Portable/src/Argon2/Argon2PasswordEntry.cs +++ b/lib/Hashing.Portable/src/Argon2/Argon2PasswordEntry.cs @@ -30,57 +30,64 @@ using VNLib.Utils.Extensions; namespace VNLib.Hashing { - internal readonly ref struct Argon2PasswordEntry + internal readonly ref struct Argon2PasswordEntry(ReadOnlySpan str) { - private readonly ReadOnlySpan _window; + private readonly ReadOnlySpan _window = str; - public readonly Argon2Version Version; - public readonly ReadOnlySpan Salt; - public readonly ReadOnlySpan Hash; + public readonly Argon2Version Version = ParseVersion(str); + public readonly ReadOnlySpan Salt = ParseSalt(str); + public readonly ReadOnlySpan Hash = ParseHash(str); private static Argon2Version ParseVersion(ReadOnlySpan window) { //Version comes after the v= prefix ReadOnlySpan v = window.SliceAfterParam("v="); - v = v.SliceBeforeParam(','); //Parse the version as an enum value - return Enum.Parse(v); + return Enum.Parse(v.SliceBeforeParam(',')); } private static uint ParseTimeCost(ReadOnlySpan window) { //TimeCost comes after the t= prefix ReadOnlySpan t = window.SliceAfterParam("t="); - t = t.SliceBeforeParam(','); //Parse the time cost as an unsigned integer - return uint.Parse(t, NumberStyles.Integer, CultureInfo.InvariantCulture); + return uint.Parse( + t.SliceBeforeParam(','), + NumberStyles.Integer, + CultureInfo.InvariantCulture + ); } private static uint ParseMemoryCost(ReadOnlySpan window) { //MemoryCost comes after the m= prefix ReadOnlySpan m = window.SliceAfterParam("m="); - m = m.SliceBeforeParam(','); //Parse the memory cost as an unsigned integer - return uint.Parse(m, NumberStyles.Integer, CultureInfo.InvariantCulture); + return uint.Parse( + m.SliceBeforeParam(','), + NumberStyles.Integer, + CultureInfo.InvariantCulture + ); } private static uint ParseParallelism(ReadOnlySpan window) { //Parallelism comes after the p= prefix ReadOnlySpan p = window.SliceAfterParam("p="); - p = p.SliceBeforeParam(','); //Parse the parallelism as an unsigned integer - return uint.Parse(p, NumberStyles.Integer, CultureInfo.InvariantCulture); + return uint.Parse( + p.SliceBeforeParam(','), + NumberStyles.Integer, + CultureInfo.InvariantCulture + ); } private static ReadOnlySpan ParseSalt(ReadOnlySpan window) { //Salt comes after the s= prefix ReadOnlySpan s = window.SliceAfterParam("s="); - s = s.SliceBeforeParam('$'); //Parse the salt as a string - return s; + return s.SliceBeforeParam('$'); } private static ReadOnlySpan ParseHash(ReadOnlySpan window) @@ -90,14 +97,6 @@ namespace VNLib.Hashing return window[(start + 1)..]; } - public Argon2PasswordEntry(ReadOnlySpan str) - { - _window = str; - Version = ParseVersion(str); - Salt = ParseSalt(str); - Hash = ParseHash(str); - } - public readonly Argon2CostParams GetCostParams() { return new() diff --git a/lib/Hashing.Portable/src/Argon2/VnArgon2.cs b/lib/Hashing.Portable/src/Argon2/VnArgon2.cs index b88c232..d557822 100644 --- a/lib/Hashing.Portable/src/Argon2/VnArgon2.cs +++ b/lib/Hashing.Portable/src/Argon2/VnArgon2.cs @@ -35,6 +35,14 @@ using VNLib.Utils.Extensions; using VNLib.Utils.Resources; using VNLib.Hashing.Native.MonoCypher; +/* + * Some stuff to note + * + * Functions have explicit parameters to avoid accidental buffer mixup + * when calling nested/overload functions. Please keep it that way for now + * I really want to avoid a whoopsie in password hasing. + */ + namespace VNLib.Hashing { @@ -78,9 +86,8 @@ namespace VNLib.Hashing argon2EnvPath ??= ARGON2_DEFUALT_LIB_NAME; Trace.WriteLine("Attempting to load global native Argon2 library from: " + argon2EnvPath, "VnArgon2"); - - SafeLibraryHandle lib = SafeLibraryHandle.LoadLibrary(argon2EnvPath, DllImportSearchPath.SafeDirectories); - return new SafeArgon2Library(lib); + + return LoadCustomLibrary(argon2EnvPath, DllImportSearchPath.SafeDirectories); } } @@ -131,27 +138,31 @@ namespace VNLib.Hashing { //Get bytes count int saltbytes = LocEncoding.GetByteCount(salt); - - //Get bytes count for password int passBytes = LocEncoding.GetByteCount(password); //Alloc memory for salt - using MemoryHandle buffer = PwHeap.Alloc(saltbytes + passBytes); + using MemoryHandle buffer = PwHeap.Alloc(MemoryUtil.NearestPage(saltbytes + passBytes)); Span saltBuffer = buffer.AsSpan(0, saltbytes); Span passBuffer = buffer.AsSpan(saltbytes, passBytes); - //Encode salt with span the same size of the salt + //Decode from character buffers to binary buffers using default string encoding _ = LocEncoding.GetBytes(salt, saltBuffer); - - //Encode password, create a new span to make sure its proper size _ = LocEncoding.GetBytes(password, passBuffer); - - //Hash - string result = Hash2id(lib, passBuffer, saltBuffer, secret, in costParams, hashLen); - - //Zero buffer - MemoryUtil.InitializeBlock(ref buffer.GetReference(), buffer.GetIntLength()); + + string result = Hash2id( + lib: lib, + password: passBuffer, + salt: saltBuffer, + secret: secret, + costParams: in costParams, + hashLen: hashLen + ); + + MemoryUtil.InitializeBlock( + ref buffer.GetReference(), + buffer.GetIntLength() + ); return result; } @@ -180,17 +191,26 @@ namespace VNLib.Hashing //Get bytes count int passBytes = LocEncoding.GetByteCount(password); - //Alloc memory for password - using MemoryHandle pwdHandle = PwHeap.Alloc(passBytes); + //Alloc memory for password, round to page size again + using MemoryHandle pwdHandle = PwHeap.Alloc(MemoryUtil.NearestPage(passBytes)); //Encode password, create a new span to make sure its proper size _ = LocEncoding.GetBytes(password, pwdHandle.Span); - - //Hash - string result = Hash2id(lib, pwdHandle.Span, salt, secret, in costParams, hashLen); + + string result = Hash2id( + lib: lib, + password: pwdHandle.AsSpan(0, passBytes), //Only actuall size for decoding + salt: salt, + secret: secret, + costParams: in costParams, + hashLen: hashLen + ); //Zero buffer - MemoryUtil.InitializeBlock(ref pwdHandle.GetReference(), pwdHandle.GetIntLength()); + MemoryUtil.InitializeBlock( + ref pwdHandle.GetReference(), + pwdHandle.GetIntLength() + ); return result; } @@ -217,16 +237,26 @@ namespace VNLib.Hashing ) { string hash, salts; - //Alloc data for hash output - using IMemoryHandle hashHandle = PwHeap.Alloc(hashLen, true); - - //hash the password - Hash2id(lib, password, salt, secret, hashHandle.Span, in costParams); - //Encode hash - hash = Convert.ToBase64String(hashHandle.Span); - - //encode salt + /* + * Alloc a buffer of the nearest page to help disguise password related + * allocations. Global zero is always set on PwHeap. + */ + using MemoryHandle outputHandle = PwHeap.Alloc(MemoryUtil.NearestPage(hashLen)); + + //Trim buffer to exact hash size as it will likely be larger due to page alignment + Span outBuffer = outputHandle.AsSpan(0, checked((int)hashLen)); + + Hash2id( + lib: lib, + password: password, + salt: salt, + secret: secret, + rawHashOutput: outBuffer, + costParams: in costParams + ); + + hash = Convert.ToBase64String(outBuffer); salts = Convert.ToBase64String(salt); //Encode salt in base64 @@ -253,37 +283,36 @@ namespace VNLib.Hashing in Argon2CostParams costParams ) { - fixed (byte* pwd = password, slptr = salt, secretptr = secret, outPtr = rawHashOutput) + //Setup context + Argon2Context ctx = new() { - //Setup context - Argon2Context ctx; - //Pointer - Argon2Context* context = &ctx; - context->version = Argon2Version.Argon2DefaultVersion; - context->t_cost = costParams.TimeCost; - context->m_cost = costParams.MemoryCost; - context->threads = costParams.Parallelism; - context->lanes = costParams.Parallelism; - //Default flags - context->flags = ARGON2_DEFAULT_FLAGS; - context->allocate_cbk = null; - context->free_cbk = null; - //Password - context->pwd = pwd; - context->pwdlen = (uint)password.Length; - //Salt - context->salt = slptr; - context->saltlen = (uint)salt.Length; - //Secret - context->secret = secretptr; - context->secretlen = (uint)secret.Length; - //Output - context->outptr = outPtr; - context->outlen = (uint)rawHashOutput.Length; - //Hash - Argon2_ErrorCodes result = (Argon2_ErrorCodes)lib.Argon2Hash((IntPtr)context); - //Throw exceptions if error - ThrowOnArgonErr(result); + version = Argon2Version.Argon2DefaultVersion, + t_cost = costParams.TimeCost, + m_cost = costParams.MemoryCost, + threads = costParams.Parallelism, + lanes = costParams.Parallelism, + flags = ARGON2_DEFAULT_FLAGS, + allocate_cbk = null, + free_cbk = null, + }; + + fixed (byte* pSecret = secret, pPass = password, pSalt = salt, pRawHash = rawHashOutput) + { + ctx.pwd = pPass; + ctx.pwdlen = (uint)password.Length; + + ctx.salt = pSalt; + ctx.saltlen = (uint)salt.Length; + + ctx.secret = pSecret; + ctx.secretlen = (uint)secret.Length; + + ctx.outptr = pRawHash; + ctx.outlen = (uint)rawHashOutput.Length; //Clamp to actual desired hash size + + Argon2_ErrorCodes argResult = (Argon2_ErrorCodes)lib.Argon2Hash(new IntPtr(&ctx)); + //Throw an excpetion if an error ocurred + ThrowOnArgonErr(argResult); } } @@ -332,16 +361,20 @@ namespace VNLib.Hashing int saltBase64BufSize = Base64.GetMaxDecodedFromUtf8Length(entry.Salt.Length); int rawPassLen = LocEncoding.GetByteCount(rawPass); - //Alloc buffer for decoded data - using MemoryHandle rawBufferHandle = PwHeap.Alloc(passBase64BufSize + saltBase64BufSize + rawPassLen); + /* + * Alloc binary buffer for decoding. Align it to the nearest page again + * to help disguise the allocation purpose. + */ + nint nearestPage = MemoryUtil.NearestPage(passBase64BufSize + saltBase64BufSize + rawPassLen); + using MemoryHandle rawBufferHandle = PwHeap.Alloc(nearestPage); //Split buffers - Span saltBuf = rawBufferHandle.Span[..saltBase64BufSize]; + Span saltBuf = rawBufferHandle.AsSpan(0, saltBase64BufSize); Span passBuf = rawBufferHandle.AsSpan(saltBase64BufSize, passBase64BufSize); Span rawPassBuf = rawBufferHandle.AsSpan(saltBase64BufSize + passBase64BufSize, rawPassLen); + //Decode hash { - //Decode salt if (!Convert.TryFromBase64Chars(entry.Hash, passBuf, out int actualHashLen)) { throw new VnArgon2PasswordFormatException("Failed to recover hash bytes"); @@ -362,11 +395,21 @@ namespace VNLib.Hashing //encode password bytes rawPassLen = LocEncoding.GetBytes(rawPass, rawPassBuf); - //Verify password - bool result = Verify2id(lib, rawPassBuf[..rawPassLen], saltBuf, secret, passBuf, in costParams); - //Zero buffer - MemoryUtil.InitializeBlock(ref rawBufferHandle.GetReference(), rawBufferHandle.GetIntLength()); + bool result = Verify2id( + lib: lib, + rawPass: rawPassBuf[..rawPassLen], + salt: saltBuf, + secret: secret, + hashBytes: passBuf, + costParams: in costParams + ); + + //Zero entire buffer + MemoryUtil.InitializeBlock( + ref rawBufferHandle.GetReference(), + rawBufferHandle.GetIntLength() + ); return result; } @@ -395,48 +438,35 @@ namespace VNLib.Hashing in Argon2CostParams costParams ) { - //Alloc data for hash output - using MemoryHandle outputHandle = PwHeap.Alloc(hashBytes.Length); - - //Get pointers - fixed (byte* secretptr = secret, pwd = rawPass, slptr = salt) - { - //Setup context - Argon2Context ctx; - //Pointer - Argon2Context* context = &ctx; - context->version = Argon2Version.Argon2DefaultVersion; - context->t_cost = costParams.TimeCost; - context->m_cost = costParams.MemoryCost; - context->threads = costParams.Parallelism; - context->lanes = costParams.Parallelism; - //Default flags - context->flags = ARGON2_DEFAULT_FLAGS; - //Use default memory allocator - context->allocate_cbk = null; - context->free_cbk = null; - //Password - context->pwd = pwd; - context->pwdlen = (uint)rawPass.Length; - //Salt - context->salt = slptr; - context->saltlen = (uint)salt.Length; - //Secret - context->secret = secretptr; - context->secretlen = (uint)secret.Length; - //Output - context->outptr = outputHandle.Base; - context->outlen = (uint)outputHandle.Length; - //Hash - Argon2_ErrorCodes argResult = (Argon2_ErrorCodes)lib.Argon2Hash((IntPtr)context); - //Throw an excpetion if an error ocurred - ThrowOnArgonErr(argResult); - } - //Return the comparison - bool result = CryptographicOperations.FixedTimeEquals(outputHandle.Span, hashBytes); - - //Zero buffer - MemoryUtil.InitializeBlock(ref outputHandle.GetReference(), outputHandle.GetIntLength()); + /* + * Alloc a buffer of the nearest page to help disguise password related + * allocations. Global zero is always set on PwHeap. + */ + using MemoryHandle outputHandle = PwHeap.Alloc(MemoryUtil.NearestPage(hashBytes.Length)); + + //Trim buffer to exact hash size as it will likely be larger due to page alignment + Span outBuffer = outputHandle.AsSpan(0, hashBytes.Length); + + /* + * Verification works by computing the hash of the input and comparing it + * to the existing one. Hash functions are one-way by design, so now you know :) + */ + + Hash2id( + lib: lib, + password: rawPass, + salt: salt, + secret: secret, + rawHashOutput: outBuffer, + costParams: in costParams + ); + + bool result = CryptographicOperations.FixedTimeEquals(outBuffer, hashBytes); + + MemoryUtil.InitializeBlock( + ref outputHandle.GetReference(), + outputHandle.GetIntLength() + ); return result; } diff --git a/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj b/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj index 7e31e0c..da61ae1 100644 --- a/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj +++ b/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj @@ -1,17 +1,20 @@  - net8.0 + net8.0 + enable VNLib.Hashing.Portable VNLib.Hashing - True - enable - latest-all + True True True false + + latest-all + + VNLib Hashing Function/Alg Library Provides managed and random cryptocraphic hashing helper classes, including complete Argon2 password hashing. diff --git a/lib/Hashing.Portable/tests/ManagedHashTests.cs b/lib/Hashing.Portable/tests/ManagedHashTests.cs index 3bcdb33..8657290 100644 --- a/lib/Hashing.Portable/tests/ManagedHashTests.cs +++ b/lib/Hashing.Portable/tests/ManagedHashTests.cs @@ -8,6 +8,7 @@ using VNLib.Utils.Memory; namespace VNLib.Hashing.Tests { + [TestClass()] public class ManagedHashTests { @@ -30,27 +31,27 @@ namespace VNLib.Hashing.Tests //Compute hash ERRNO hashSize = ManagedHash.ComputeHash(testData, heapBuffer.Span, alg); - Assert.IsTrue(hashSize == Math.Abs(hashSize)); + Assert.IsTrue(hashSize == ManagedHash.GetHashSize(alg)); //With input string and heap buffer hashSize = ManagedHash.ComputeHash("test", heapBuffer.Span, alg); - Assert.IsTrue(hashSize == Math.Abs(hashSize)); + Assert.IsTrue(hashSize == ManagedHash.GetHashSize(alg)); //Compute string and byte array byte[] testdata = ManagedHash.ComputeHash(testData, alg); - Assert.IsTrue(testdata.Length == Math.Abs(hashSize)); + Assert.IsTrue(testdata.Length == ManagedHash.GetHashSize(alg)); //With input string testdata = ManagedHash.ComputeHash("test", alg); - Assert.IsTrue(testdata.Length == Math.Abs(hashSize)); + Assert.IsTrue(testdata.Length == ManagedHash.GetHashSize(alg)); - //Compute hash as string + //Compute hash as a hex string. Output should be 2x because hex is 2 chars per byte string testEnc = ManagedHash.ComputeHash(testdata, alg, HashEncodingMode.Hexadecimal); - Assert.IsTrue(testEnc.Length == Math.Abs(hashSize) * 2); + Assert.IsTrue(testEnc.Length == ManagedHash.GetHashSize(alg) * 2); //With input string testEnc = ManagedHash.ComputeHash("test", alg, HashEncodingMode.Hexadecimal); - Assert.IsTrue(testEnc.Length == Math.Abs(hashSize) * 2); + Assert.IsTrue(testEnc.Length == ManagedHash.GetHashSize(alg) * 2); } } @@ -74,27 +75,27 @@ namespace VNLib.Hashing.Tests //Compute hash ERRNO hashSize = ManagedHash.ComputeHmac(testKey, testData, heapBuffer.Span, alg); - Assert.IsTrue(hashSize == Math.Abs(hashSize)); + Assert.IsTrue(hashSize == ManagedHash.GetHashSize(alg)); //With input string and heap buffer hashSize = ManagedHash.ComputeHmac(testKey, "test", heapBuffer.Span, alg); - Assert.IsTrue(hashSize == Math.Abs(hashSize)); + Assert.IsTrue(hashSize == ManagedHash.GetHashSize(alg)); //Compute string and byte array byte[] testdata = ManagedHash.ComputeHmac(testKey, testData, alg); - Assert.IsTrue(testdata.Length == Math.Abs(hashSize)); + Assert.IsTrue(testdata.Length == ManagedHash.GetHashSize(alg)); //With input string testdata = ManagedHash.ComputeHmac(testKey, "test", alg); - Assert.IsTrue(testdata.Length == Math.Abs(hashSize)); + Assert.IsTrue(testdata.Length == ManagedHash.GetHashSize(alg)); //Compute hash as string string testEnc = ManagedHash.ComputeHmac(testKey, testdata, alg, HashEncodingMode.Hexadecimal); - Assert.IsTrue(testEnc.Length == Math.Abs(hashSize) * 2); + Assert.IsTrue(testEnc.Length == ManagedHash.GetHashSize(alg) * 2); //With input string testEnc = ManagedHash.ComputeHmac(testKey, "test", alg, HashEncodingMode.Hexadecimal); - Assert.IsTrue(testEnc.Length == Math.Abs(hashSize) * 2); + Assert.IsTrue(testEnc.Length == ManagedHash.GetHashSize(alg) * 2); } } diff --git a/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj b/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj index 14672ae..c5b428e 100644 --- a/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj +++ b/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj @@ -2,18 +2,20 @@ net8.0 + enable VNLib.Net.Compression VNLib.Net.Compression true - enable True - latest-all false - true + + latest-all + + VNLib.Net.Compression Vaughn Nugent diff --git a/lib/Net.Compression/vnlib_compress/CMakeLists.txt b/lib/Net.Compression/vnlib_compress/CMakeLists.txt index c3eb723..0004c60 100644 --- a/lib/Net.Compression/vnlib_compress/CMakeLists.txt +++ b/lib/Net.Compression/vnlib_compress/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(vnlib_compress C) -set(CMAKE_PROJECT_NAME "vnlib_compress") +set(_COMP_PROJ_NAME "vnlib_compress") #set options for enable botli and zlib option(ENABLE_BROTLI "Enable brotli compression" ON) @@ -39,7 +39,7 @@ if(ENABLE_BROTLI) FetchContent_Declare( lib_brotli GIT_REPOSITORY https://github.com/google/brotli.git - GIT_TAG 1b3a5ccb6e7b9384b741437532f4dae0730c61f2 + GIT_TAG 04388304a6f8181cc1f022cc9e95dbb3bfe829a3 GIT_PROGRESS TRUE ) @@ -95,38 +95,36 @@ if(ENABLE_RPMALLOC) add_compile_definitions(VNLIB_CUSTOM_MALLOC_ENABLE) endif() - -#Setup the compiler options -set(CMAKE_C_STANDARD_REQUIRED ON) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) #enable position independent code (for shared libraries with exports) - ############################### # # CONFIGURE LIBRARY BUILD # ############################### +set(CMAKE_C_STANDARD_REQUIRED ON) + if(COMPRESS_BUILD_SHARED) - set(TARGET_NAME ${CMAKE_PROJECT_NAME}) - add_library(${TARGET_NAME} SHARED ${VNLIB_COMPRESS_SOURCES} ${COMP_HEADERS}) + add_library(${_COMP_PROJ_NAME} SHARED ${VNLIB_COMPRESS_SOURCES} ${COMP_HEADERS}) + #enable position independent code (for shared libraries with exports) + set_target_properties(${_COMP_PROJ_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) else() - set(TARGET_NAME ${CMAKE_PROJECT_NAME}_static) - add_library(${TARGET_NAME} STATIC ${VNLIB_COMPRESS_SOURCES} ${COMP_HEADERS}) + set(_COMP_PROJ_NAME ${_COMP_PROJ_NAME}_static) #append static to the name + add_library(${_COMP_PROJ_NAME} STATIC ${VNLIB_COMPRESS_SOURCES} ${COMP_HEADERS}) endif() -target_compile_features(${TARGET_NAME} PRIVATE c_std_90) #force compiler to use c90 standard for library +target_compile_features(${_COMP_PROJ_NAME} PRIVATE c_std_90) #force compiler to use c90 standard for library #if on unix lib will be appended, so we can adjust if(UNIX) - set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME vn_compress) + set_target_properties(${_COMP_PROJ_NAME} PROPERTIES OUTPUT_NAME vn_compress) endif() #since were buildiing in tree, set the export defintiions -target_compile_definitions(${TARGET_NAME} PRIVATE VNLIB_EXPORTING) +target_compile_definitions(${_COMP_PROJ_NAME} PRIVATE VNLIB_COMPRESS_EXPORTING) if(ENABLE_BROTLI) #link the encoder-only library to the main project - target_link_libraries(${TARGET_NAME} PRIVATE brotlienc) + target_link_libraries(${_COMP_PROJ_NAME} PRIVATE brotlienc) endif() if(ENABLE_ZLIB) @@ -135,22 +133,22 @@ if(ENABLE_ZLIB) target_compile_definitions(zlib PRIVATE HAS_SSE42 PRIVATE HAS_SSE2) endif() - target_link_libraries(${TARGET_NAME} PRIVATE zlib) + target_link_libraries(${_COMP_PROJ_NAME} PRIVATE zlib) endif() #link rpmalloc to the main project if(ENABLE_RPMALLOC) - target_link_libraries(${TARGET_NAME} PRIVATE vnlib_rpmalloc_static) - add_dependencies(${TARGET_NAME} vnlib_rpmalloc_static) + target_link_libraries(${_COMP_PROJ_NAME} PRIVATE vnlib_rpmalloc_static) + add_dependencies(${_COMP_PROJ_NAME} vnlib_rpmalloc_static) #Include the nativeheap api header - target_include_directories(${TARGET_NAME} PRIVATE ../../Utils.Memory/vnlib_rpmalloc/) + target_include_directories(${_COMP_PROJ_NAME} PRIVATE ../../Utils.Memory/vnlib_rpmalloc/) endif() #setup flags for windows compilation if(MSVC) target_compile_options( - ${TARGET_NAME} + ${_COMP_PROJ_NAME} PRIVATE /Qspectre @@ -173,7 +171,7 @@ if(MSVC) #set build macros target_compile_definitions( - ${TARGET_NAME} + ${_COMP_PROJ_NAME} PRIVATE $<$:DEBUG> @@ -184,7 +182,7 @@ if(MSVC) elseif(CMAKE_COMPILER_IS_GNUCC) target_compile_options( - ${TARGET_NAME} + ${_COMP_PROJ_NAME} PRIVATE -Wextra @@ -194,7 +192,7 @@ elseif(CMAKE_COMPILER_IS_GNUCC) #enable debug compiler options if(build_type STREQUAL "debug") target_compile_options( - ${TARGET_NAME} + ${_COMP_PROJ_NAME} PRIVATE -g #enable debugger info @@ -204,7 +202,7 @@ elseif(CMAKE_COMPILER_IS_GNUCC) -pedantic #enable pedantic mode ) - target_compile_definitions(${TARGET_NAME} PRIVATE DEBUG) + target_compile_definitions(${_COMP_PROJ_NAME} PRIVATE DEBUG) endif() @@ -214,11 +212,13 @@ endif() if(NATIVE_HEAP_LIB_PATH) + message(STATUS "Linking native heap library to the main project found at ${NATIVE_HEAP_LIB_PATH}") + #Include the nativeheap api header include_directories(${NATIVE_HEAP_INCLUDES}) #If manual heap linking is enabled, we need to link the native heap library - target_link_libraries(${TARGET_NAME} PRIVATE ${NATIVE_HEAP_LIB_PATH}) - target_compile_definitions(${TARGET_NAME} PRIVATE VNLIB_CUSTOM_MALLOC_ENABLE) #configure src + target_link_libraries(${_COMP_PROJ_NAME} PRIVATE ${NATIVE_HEAP_LIB_PATH}) + target_compile_definitions(${_COMP_PROJ_NAME} PRIVATE VNLIB_CUSTOM_MALLOC_ENABLE) #configure src endif() \ No newline at end of file diff --git a/lib/Net.Compression/vnlib_compress/Taskfile.yaml b/lib/Net.Compression/vnlib_compress/Taskfile.yaml index 4ddc464..f1d594e 100644 --- a/lib/Net.Compression/vnlib_compress/Taskfile.yaml +++ b/lib/Net.Compression/vnlib_compress/Taskfile.yaml @@ -17,7 +17,7 @@ tasks: cmds: - cmd: echo "Building {{.PROJECT_NAME}}" silent: true - - cmake -Bbuild/ -DCMAKE_BUILD_TYPE=Release {{.CMAKE_ARGS}} + - cmake -Bbuild/ -DCMAKE_BUILD_TYPE=Release {{.CLI_ARGS}} - cmake --build build/ --config Release #called by ci pipline to build the winx64 project diff --git a/lib/Net.Http/src/Core/ConnectionInfo.cs b/lib/Net.Http/src/Core/ConnectionInfo.cs index bcc5fe7..4a46971 100644 --- a/lib/Net.Http/src/Core/ConnectionInfo.cs +++ b/lib/Net.Http/src/Core/ConnectionInfo.cs @@ -88,33 +88,17 @@ namespace VNLib.Net.Http public IReadOnlyCollection Accept => Context.Request.Accept; /// - public ref readonly TransportSecurityInfo? GetTransportSecurityInfo() => ref Context.GetSecurityInfo(); + public ref readonly TransportSecurityInfo? GetTransportSecurityInfo() => ref Context.GetSecurityInfo(); /// - public void SetCookie(string name, string value, string? domain, string? path, TimeSpan Expires, CookieSameSite sameSite, bool httpOnly, bool secure) + public void SetCookie(in HttpResponseCookie cookie) { //name MUST not be null - ArgumentNullException.ThrowIfNull(name); - - //Create the new cookie - HttpCookie cookie = new(name) - { - Value = value, - Domain = domain, - Path = path, - MaxAge = Expires, - //Set the session lifetime flag if the timeout is max value - IsSession = Expires == TimeSpan.MaxValue, - //If the connection is cross origin, then we need to modify the secure and samsite values - SameSite = CrossOrigin ? CookieSameSite.None : sameSite, - Secure = secure | CrossOrigin, - HttpOnly = httpOnly - }; - - //Set the cookie + ArgumentException.ThrowIfNullOrWhiteSpace(cookie.Name, nameof(cookie.Name)); + Context.Response.AddCookie(in cookie); } - + internal ConnectionInfo(HttpContext ctx) { //Update the context referrence diff --git a/lib/Net.Http/src/Core/HttpCookie.cs b/lib/Net.Http/src/Core/HttpCookie.cs deleted file mode 100644 index b805e3e..0000000 --- a/lib/Net.Http/src/Core/HttpCookie.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2024 Vaughn Nugent -* -* Library: VNLib -* Package: VNLib.Net.Http -* File: HttpCookie.cs -* -* HttpCookie.cs is part of VNLib.Net.Http which is part of the larger -* VNLib collection of libraries and utilities. -* -* VNLib.Net.Http is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* VNLib.Net.Http is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see https://www.gnu.org/licenses/. -*/ - -using System; - -using VNLib.Utils; -using VNLib.Utils.Memory; -using VNLib.Utils.Extensions; - -namespace VNLib.Net.Http.Core -{ - internal readonly struct HttpCookie(string name) : IStringSerializeable, IEquatable - { - public readonly string Name { get; } = name; - public readonly string? Value { get; init; } - public readonly string? Domain { get; init; } - public readonly string? Path { get; init; } - public readonly TimeSpan MaxAge { get; init; } - public readonly CookieSameSite SameSite { get; init; } - public readonly bool Secure { get; init; } - public readonly bool HttpOnly { get; init; } - public readonly bool IsSession { get; init; } - - public readonly string Compile() => throw new NotImplementedException(); - - public readonly void Compile(ref ForwardOnlyWriter writer) - { - //set the name of the cookie - writer.Append(Name); - writer.Append('='); - - //set name - writer.Append(Value); - - //Only set the max age parameter if the cookie is not a session cookie - if (!IsSession) - { - writer.Append("; Max-Age="); - writer.Append((int)MaxAge.TotalSeconds); - } - - //Make sure domain is set - if (!string.IsNullOrWhiteSpace(Domain)) - { - writer.Append("; Domain="); - writer.Append(Domain); - } - - //Check and set path - if (!string.IsNullOrWhiteSpace(Path)) - { - //Set path - writer.Append("; Path="); - writer.Append(Path); - } - - writer.Append("; SameSite="); - - //Set the samesite flag based on the enum value - switch (SameSite) - { - case CookieSameSite.None: - writer.Append("None"); - break; - case CookieSameSite.Strict: - writer.Append("Strict"); - break; - case CookieSameSite.Lax: - default: - writer.Append("Lax"); - break; - } - - //Set httponly flag - if (HttpOnly) - { - writer.Append("; HttpOnly"); - } - - //Set secure flag - if (Secure) - { - writer.Append("; Secure"); - } - } - - public readonly ERRNO Compile(Span buffer) - { - ForwardOnlyWriter writer = new(buffer); - Compile(ref writer); - return writer.Written; - } - - public readonly override int GetHashCode() => string.GetHashCode(Name, StringComparison.OrdinalIgnoreCase); - - public readonly override bool Equals(object? obj) => obj is HttpCookie other && Equals(other); - - public readonly bool Equals(HttpCookie other) => Name.Equals(other.Name, StringComparison.OrdinalIgnoreCase); - } -} \ No newline at end of file diff --git a/lib/Net.Http/src/Core/HttpServerProcessing.cs b/lib/Net.Http/src/Core/HttpServerProcessing.cs index 7770ad7..b6dbfef 100644 --- a/lib/Net.Http/src/Core/HttpServerProcessing.cs +++ b/lib/Net.Http/src/Core/HttpServerProcessing.cs @@ -34,9 +34,11 @@ using System.Runtime.CompilerServices; using VNLib.Utils.Memory; using VNLib.Utils.Logging; +using VNLib.Utils.Extensions; using VNLib.Net.Http.Core; using VNLib.Net.Http.Core.Buffering; using VNLib.Net.Http.Core.Response; +using VNLib.Net.Http.Core.PerfCounter; namespace VNLib.Net.Http { @@ -167,14 +169,20 @@ namespace VNLib.Net.Http [MethodImpl(MethodImplOptions.AggressiveOptimization)] private async Task ProcessHttpEventAsync(HttpContext context) { + HttpPerfCounterState counter = default; + //Prepare http context to process a new message context.BeginRequest(); try { + HttpPerfCounter.StartCounter(ref counter); + //Try to parse the http request (may throw exceptions, let them propagate to the transport layer) int status = (int)ParseRequest(context); + HttpPerfCounter.StopAndLog(ref counter, in _config, "HTTP Parse"); + //Check status code for socket error, if so, return false to close the connection if (status >= 1000) { @@ -204,7 +212,7 @@ namespace VNLib.Net.Http context.Request.Compile(ref writer); //newline - writer.Append("\r\n"); + writer.AppendSmall("\r\n"); //Response context.Response.Compile(ref writer); @@ -218,11 +226,15 @@ namespace VNLib.Net.Http WriteConnectionDebugLog(this, context); } #endif + + HttpPerfCounter.StartCounter(ref counter); await context.WriteResponseAsync(); - + await context.FlushTransportAsync(); - + + HttpPerfCounter.StopAndLog(ref counter, in _config, "HTTP Response"); + /* * If an alternate protocol was specified, we need to break the keepalive loop * the handler will manage the alternate protocol diff --git a/lib/Net.Http/src/Core/IHttpContextInformation.cs b/lib/Net.Http/src/Core/IHttpContextInformation.cs index 14067f5..38e86b3 100644 --- a/lib/Net.Http/src/Core/IHttpContextInformation.cs +++ b/lib/Net.Http/src/Core/IHttpContextInformation.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: VNLib.Net.Http @@ -22,7 +22,6 @@ * along with this program. If not, see https://www.gnu.org/licenses/. */ -using System; using System.IO; using System.Text; diff --git a/lib/Net.Http/src/Core/PerfCounter/HttpPerfCounter.cs b/lib/Net.Http/src/Core/PerfCounter/HttpPerfCounter.cs new file mode 100644 index 0000000..0dcefb1 --- /dev/null +++ b/lib/Net.Http/src/Core/PerfCounter/HttpPerfCounter.cs @@ -0,0 +1,76 @@ +/* +* Copyright (c) 2024 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Net.Http +* File: HttpPerfCounter.cs +* +* HttpPerfCounter.cs is part of VNLib.Net.Http which is part of the larger +* VNLib collection of libraries and utilities. +* +* VNLib.Net.Http is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Net.Http is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +using System; +using System.Diagnostics; + +using VNLib.Utils.Logging; + + +namespace VNLib.Net.Http.Core.PerfCounter +{ + internal static class HttpPerfCounter + { + + [Conditional("DEBUG")] + internal static void StartCounter(ref HttpPerfCounterState state) + { + state.StopValue = state.StartValue = TimeProvider.System.GetTimestamp(); + } + + [Conditional("DEBUG")] + internal static void StopCounter(ref HttpPerfCounterState state) + { + state.StopValue = TimeProvider.System.GetTimestamp(); + } + + /// + /// Gets the total time elapsed in microseconds + /// + /// The time in microseconds that has elapsed since the timer was started and stopped + internal static TimeSpan GetElapsedTime(ref readonly HttpPerfCounterState state) + => TimeProvider.System.GetElapsedTime(state.StartValue, state.StopValue); + + /* + * Enable http performance counters for tracing. + * Only available in debug builds until it can be + * configured for zero-cost + */ + + [Conditional("DEBUG")] + internal static void StopAndLog(ref HttpPerfCounterState state, ref readonly HttpConfig config, string counter) + { + if (!config.DebugPerformanceCounters) + { + return; + } + + StopCounter(ref state); + + TimeSpan duration = GetElapsedTime(in state); + + config.ServerLog.Debug("[PERF]: ({state}) - {us}us elapsed", counter, duration.TotalMicroseconds); + } + } +} \ No newline at end of file diff --git a/lib/Net.Http/src/Core/PerfCounter/HttpPerfCounterState.cs b/lib/Net.Http/src/Core/PerfCounter/HttpPerfCounterState.cs new file mode 100644 index 0000000..a86ac40 --- /dev/null +++ b/lib/Net.Http/src/Core/PerfCounter/HttpPerfCounterState.cs @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2024 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Net.Http +* File: ConnectionInfo.cs +* +* ConnectionInfo.cs is part of VNLib.Net.Http which is part of the larger +* VNLib collection of libraries and utilities. +* +* VNLib.Net.Http is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Net.Http is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +namespace VNLib.Net.Http.Core.PerfCounter +{ + internal struct HttpPerfCounterState + { + internal long StartValue; + internal long StopValue; + } +} \ No newline at end of file diff --git a/lib/Net.Http/src/Core/Request/HttpRequest.cs b/lib/Net.Http/src/Core/Request/HttpRequest.cs index 3ebf0d4..2c9eed0 100644 --- a/lib/Net.Http/src/Core/Request/HttpRequest.cs +++ b/lib/Net.Http/src/Core/Request/HttpRequest.cs @@ -161,11 +161,12 @@ namespace VNLib.Net.Http.Core { return Array.Empty(); } + //Create new array to hold uploads - FileUpload[] uploads = new FileUpload[_state.UploadCount]; - //Copy uploads to new array + FileUpload[] uploads = GC.AllocateUninitializedArray(_state.UploadCount, false); + Array.Copy(_uploads, uploads, _state.UploadCount); - //Return new array + return uploads; } diff --git a/lib/Net.Http/src/Core/Response/HttpContextResponseWriting.cs b/lib/Net.Http/src/Core/Response/HttpContextResponseWriting.cs index dcd0553..93ce5b2 100644 --- a/lib/Net.Http/src/Core/Response/HttpContextResponseWriting.cs +++ b/lib/Net.Http/src/Core/Response/HttpContextResponseWriting.cs @@ -93,7 +93,7 @@ namespace VNLib.Net.Http.Core //Determine if compression should be used bool compressionDisabled = //disabled because app code disabled it - ContextFlags.IsSet(HttpControlMask.CompressionDisabed) + ContextFlags.IsSet(HttpControlMask.CompressionDisabled) //Disabled because too large or too small || length >= ParentServer.Config.CompressionLimit || length < ParentServer.Config.CompressionMinimum diff --git a/lib/Net.Http/src/Core/Response/HttpResponse.cs b/lib/Net.Http/src/Core/Response/HttpResponse.cs index 1340dac..e354998 100644 --- a/lib/Net.Http/src/Core/Response/HttpResponse.cs +++ b/lib/Net.Http/src/Core/Response/HttpResponse.cs @@ -46,7 +46,7 @@ namespace VNLib.Net.Http.Core.Response { const int DefaultCookieCapacity = 2; - private readonly Dictionary Cookies = new(DefaultCookieCapacity, StringComparer.OrdinalIgnoreCase); + private readonly Dictionary Cookies = new(DefaultCookieCapacity, StringComparer.OrdinalIgnoreCase); private readonly DirectStream ReusableDirectStream = new(); private readonly ChunkedStream ReusableChunkedStream = new(manager.ChunkAccumulatorBuffer, ContextInfo); private readonly HeaderDataAccumulator Writer = new(manager.ResponseHeaderBuffer, ContextInfo); @@ -61,7 +61,7 @@ namespace VNLib.Net.Http.Core.Response /// /// Response header collection /// - public VnWebHeaderCollection Headers { get; } = []; + public readonly VnWebHeaderCollection Headers = []; /// /// The current http status code value @@ -88,7 +88,7 @@ namespace VNLib.Net.Http.Core.Response /// /// Cookie to add [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal void AddCookie(in HttpCookie cookie) => Cookies[cookie.Name] = cookie; + internal void AddCookie(ref readonly HttpResponseCookie cookie) => Cookies[cookie.Name] = cookie; /// /// Compiles and flushes all headers to the header accumulator ready for sending @@ -106,13 +106,13 @@ namespace VNLib.Net.Http.Core.Response if (!HeadersBegun) { //write status code first - writer.Append(HttpHelpers.GetResponseString(ContextInfo.CurrentVersion, _code)); - writer.Append(HttpHelpers.CRLF); + writer.AppendSmall(HttpHelpers.GetResponseString(ContextInfo.CurrentVersion, _code)); + writer.AppendSmall(HttpHelpers.CRLF); //Write the date to header buffer - writer.Append("Date: "); + writer.AppendSmall("Date: "); writer.Append(DateTimeOffset.UtcNow, "R"); - writer.Append(HttpHelpers.CRLF); + writer.AppendSmall(HttpHelpers.CRLF); //Set begun flag HeadersBegun = true; @@ -122,10 +122,10 @@ namespace VNLib.Net.Http.Core.Response for (int i = 0; i < Headers.Count; i++) { //: \r\n - writer.Append(Headers.Keys[i]); - writer.Append(": "); - writer.Append(Headers[i]); - writer.Append(HttpHelpers.CRLF); + writer.Append(Headers.Keys[i]); + writer.AppendSmall(": "); + writer.Append(Headers[i]); + writer.AppendSmall(HttpHelpers.CRLF); } //Remove writen headers @@ -134,14 +134,14 @@ namespace VNLib.Net.Http.Core.Response //Write cookies if any are set if (Cookies.Count > 0) { - foreach (HttpCookie cookie in Cookies.Values) + foreach (HttpResponseCookie cookie in Cookies.Values) { - writer.Append("Set-Cookie: "); + writer.AppendSmall("Set-Cookie: "); //Write the cookie to the header buffer cookie.Compile(ref writer); - writer.Append(HttpHelpers.CRLF); + writer.AppendSmall(HttpHelpers.CRLF); } Cookies.Clear(); @@ -431,7 +431,7 @@ namespace VNLib.Net.Http.Core.Response } //Enumerate and write - foreach (HttpCookie cookie in Cookies.Values) + foreach (HttpResponseCookie cookie in Cookies.Values) { writer.Append("Set-Cookie: "); diff --git a/lib/Net.Http/src/Core/Response/ResponsBodyDataState.cs b/lib/Net.Http/src/Core/Response/ResponsBodyDataState.cs index 797d490..bd43def 100644 --- a/lib/Net.Http/src/Core/Response/ResponsBodyDataState.cs +++ b/lib/Net.Http/src/Core/Response/ResponsBodyDataState.cs @@ -3,10 +3,10 @@ * * Library: VNLib * Package: VNLib.Net.Http -* File: ResponseWriter.cs +* File: ResponsBodyDataState.cs * -* ResponseWriter.cs is part of VNLib.Net.Http which is part of the larger -* VNLib collection of libraries and utilities. +* ResponsBodyDataState.cs is part of VNLib.Net.Http which is part of +* the larger VNLib collection of libraries and utilities. * * VNLib.Net.Http is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as diff --git a/lib/Net.Http/src/Core/Response/ResponseWriter.cs b/lib/Net.Http/src/Core/Response/ResponseWriter.cs index b60537d..fabdff3 100644 --- a/lib/Net.Http/src/Core/Response/ResponseWriter.cs +++ b/lib/Net.Http/src/Core/Response/ResponseWriter.cs @@ -182,30 +182,33 @@ namespace VNLib.Net.Http.Core.Response { if (blockSize > 0) { + /* + * Write data directly from memory response but fix the block size to the size + * of the compressor if it has one, to optimize compression + */ while (_userState.MemResponse.Remaining > 0) { - //Get next segment clamped to the block size _readSegment = _userState.MemResponse.GetRemainingConstrained(blockSize); - - //Commit output bytes + await dest.WriteAsync(_readSegment); - - //Advance by the written amount + _userState.MemResponse.Advance(_readSegment.Length); } } else - { - //Write response body from memory + { + /* + * Compressor block size is unkown so we can assume it does not matter + * and write full blocks as they are read. This will usually be a on-shot + * operation, since the writer handles chunk buffering + */ + while (_userState.MemResponse.Remaining > 0) { - //Get remaining segment _readSegment = _userState.MemResponse.GetMemory(); - - //Write segment to output stream + await dest.WriteAsync(_readSegment); - - //Advance by the written amount + _userState.MemResponse.Advance(_readSegment.Length); } } diff --git a/lib/Net.Http/src/Helpers/HttpControlMask.cs b/lib/Net.Http/src/Helpers/HttpControlMask.cs index a2a004d..e24d088 100644 --- a/lib/Net.Http/src/Helpers/HttpControlMask.cs +++ b/lib/Net.Http/src/Helpers/HttpControlMask.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: VNLib.Net.Http @@ -33,7 +33,7 @@ namespace VNLib.Net.Http /// /// Tells the http server that dynamic response compression should be disabled /// - public const ulong CompressionDisabed = 0x01UL; + public const ulong CompressionDisabled = 0x01UL; /// /// Tells the server not to set a 0 content length header when sending a response that does diff --git a/lib/Net.Http/src/Helpers/HttpHelpers.cs b/lib/Net.Http/src/Helpers/HttpHelpers.cs index 86616f8..cf8e189 100644 --- a/lib/Net.Http/src/Helpers/HttpHelpers.cs +++ b/lib/Net.Http/src/Helpers/HttpHelpers.cs @@ -227,29 +227,29 @@ namespace VNLib.Net.Http ForwardOnlyWriter sb = new(buffer); if ((type & CacheType.NoCache) > 0) { - sb.Append("no-cache, "); + sb.AppendSmall("no-cache, "); } if ((type & CacheType.NoStore) > 0) { - sb.Append("no-store, "); + sb.AppendSmall("no-store, "); } if ((type & CacheType.Public) > 0) { - sb.Append("public, "); + sb.AppendSmall("public, "); } if ((type & CacheType.Private) > 0) { - sb.Append("private, "); + sb.AppendSmall("private, "); } if ((type & CacheType.Revalidate) > 0) { - sb.Append("must-revalidate, "); + sb.AppendSmall("must-revalidate, "); } if (immutable) { - sb.Append("immutable, "); + sb.AppendSmall("immutable, "); } - sb.Append("max-age="); + sb.AppendSmall("max-age="); sb.Append(maxAge); return sb.ToString(); } diff --git a/lib/Net.Http/src/HttpConfig.cs b/lib/Net.Http/src/HttpConfig.cs index 274e163..c74bdbb 100644 --- a/lib/Net.Http/src/HttpConfig.cs +++ b/lib/Net.Http/src/HttpConfig.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: VNLib.Net.Http @@ -124,5 +124,10 @@ namespace VNLib.Net.Http /// the server. /// public readonly IHttpCompressorManager? CompressorManager { get; init; } = null; + + /// + /// Enables debug performance counters + /// + public readonly bool DebugPerformanceCounters { get; init; } = false; } } \ No newline at end of file diff --git a/lib/Net.Http/src/HttpResponseCookie.cs b/lib/Net.Http/src/HttpResponseCookie.cs new file mode 100644 index 0000000..8fc54c2 --- /dev/null +++ b/lib/Net.Http/src/HttpResponseCookie.cs @@ -0,0 +1,226 @@ +/* +* Copyright (c) 2024 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Net.Http +* File: HttpResponseCookie.cs +* +* HttpResponseCookie.cs is part of VNLib.Net.Http which is part of the larger +* VNLib collection of libraries and utilities. +* +* VNLib.Net.Http is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Net.Http is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +using System; + +using VNLib.Utils; +using VNLib.Utils.Memory; +using VNLib.Utils.Extensions; + +namespace VNLib.Net.Http +{ + /// + /// Represents an HTTP cookie that is set with responses. + /// + /// The cookie name + public readonly struct HttpResponseCookie(string name) : IStringSerializeable, IEquatable + { + /// + /// The default copy buffer allocated when calling the + /// family of methods. + /// + public const int DefaultCookieBufferSize = 4096; + + + /// + /// The name of the cookie to set. + /// + public readonly string Name { get; } = name; + + /// + /// The actual cookie content or value. + /// + public readonly string? Value { get; init; } + + /// + /// The domain this cookie will be sent to. + /// + public readonly string? Domain { get; init; } + + /// + /// The cookie path the client will send this cookie with. Null + /// or empty string for all paths. + /// + public readonly string? Path { get; init; } + + /// + /// Sets the duration of the cookie lifetime (in seconds), aka MaxAge + /// + public readonly TimeSpan MaxAge { get; init; } + + /// + /// Sets the cookie Samesite field. + /// + public readonly CookieSameSite SameSite { get; init; } + + /// + /// Sets the cookie Secure flag. If true only sends the cookie with requests + /// if the connection is secure. + /// + public readonly bool Secure { get; init; } + + /// + /// Sets cookie HttpOnly flag. If true denies JavaScript access to + /// + public readonly bool HttpOnly { get; init; } + + /// + /// Sets the cookie expiration to the duration of the user's session (aka no expiration) + /// + public readonly bool IsSession { get; init; } + + /// + /// Creates an HTTP 1.x spec cookie header value from the + /// cookie fields + /// + /// The internal copy buffer defaults to + /// use if you need control over the buffer size + /// + /// + /// The cookie header value as a string + /// + public readonly string Compile() + { + nint bufSize = MemoryUtil.NearestPage(DefaultCookieBufferSize); + + return Compile(bufSize.ToInt32()); + } + + /// + /// Creates an HTTP 1.x spec cookie header value from the + /// cookie fields. + /// + /// The size of the internal accumulator buffer + /// The cookie header value as a string + /// + public readonly string Compile(int bufferSize) + { + using UnsafeMemoryHandle cookieBuffer = MemoryUtil.UnsafeAlloc(bufferSize, false); + + ERRNO count = Compile(cookieBuffer.Span); + + return cookieBuffer.AsSpan(0, (int)count).ToString(); + } + + /// + /// Creates an HTTP 1.x spec cookie header value from the + /// cookie fields. + /// + /// The character buffer to write the cookie data tor + /// The cookie header value as a string + /// + public readonly ERRNO Compile(Span buffer) + { + ForwardOnlyWriter writer = new(buffer); + Compile(ref writer); + return writer.Written; + } + + /// + /// Writes the HTTP 1.x header format for the cookie + /// + /// + public readonly void Compile(ref ForwardOnlyWriter writer) + { + writer.Append(Name); + writer.Append('='); + writer.Append(Value); + + /* + * If a session cookie is set, then do not include a max-age value + * browsers will default to session duration if not set + */ + if (!IsSession) + { + writer.AppendSmall("; Max-Age="); + writer.Append((int)MaxAge.TotalSeconds); + } + + if (!string.IsNullOrWhiteSpace(Domain)) + { + writer.AppendSmall("; Domain="); + writer.Append(Domain); + } + + if (!string.IsNullOrWhiteSpace(Path)) + { + //Set path + writer.AppendSmall("; Path="); + writer.Append(Path); + } + + writer.AppendSmall("; SameSite="); + + switch (SameSite) + { + case CookieSameSite.None: + writer.AppendSmall("None"); + break; + case CookieSameSite.Strict: + writer.AppendSmall("Strict"); + break; + case CookieSameSite.Lax: + default: + writer.AppendSmall("Lax"); + break; + } + + if (HttpOnly) + { + writer.AppendSmall("; HttpOnly"); + } + + if (Secure) + { + writer.AppendSmall("; Secure"); + } + } + + /// + public readonly override int GetHashCode() => string.GetHashCode(Name, StringComparison.OrdinalIgnoreCase); + + /// + public readonly override bool Equals(object? obj) => obj is HttpResponseCookie other && Equals(other); + + /// + public readonly bool Equals(HttpResponseCookie other) => string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase); + + /// + /// Creates an HTTP 1.x spec cookie header value from the + /// cookie fields + /// + /// The internal copy buffer defaults to + /// use if you need control over the buffer size + /// + /// + /// The cookie header value as a string + public override string ToString() => Compile(); + + /// + public static bool operator ==(HttpResponseCookie left, HttpResponseCookie right) => left.Equals(right); + + /// + public static bool operator !=(HttpResponseCookie left, HttpResponseCookie right) => !(left == right); + } +} \ No newline at end of file diff --git a/lib/Net.Http/src/IConnectionInfo.cs b/lib/Net.Http/src/IConnectionInfo.cs index 6cdb480..7598864 100644 --- a/lib/Net.Http/src/IConnectionInfo.cs +++ b/lib/Net.Http/src/IConnectionInfo.cs @@ -133,14 +133,7 @@ namespace VNLib.Net.Http /// Adds a new cookie to the response. If a cookie with the same name and value /// has been set, the old cookie is replaced with the new one. /// - /// Cookie name/id - /// Value to be stored in cookie - /// Domain for cookie to operate - /// Path to store cookie - /// Timespan representing how long the cookie should exist - /// Samesite attribute, Default = Lax - /// Specify the HttpOnly flag - /// Specify the Secure flag - void SetCookie(string name, string value, string? domain, string? path, TimeSpan Expires, CookieSameSite sameSite, bool httpOnly, bool secure); + /// A reference to the cookie to set on the current response + void SetCookie(in HttpResponseCookie cookie); } } \ No newline at end of file diff --git a/lib/Net.Http/src/VNLib.Net.Http.csproj b/lib/Net.Http/src/VNLib.Net.Http.csproj index b491cc1..e57f784 100644 --- a/lib/Net.Http/src/VNLib.Net.Http.csproj +++ b/lib/Net.Http/src/VNLib.Net.Http.csproj @@ -2,15 +2,18 @@ net8.0 + enable VNLib.Net.Http VNLib.Net.Http en-US - enable True - latest-all false + + latest-all + + VNLib.Net.Http Vaughn Nugent diff --git a/lib/Net.Messaging.FBM/src/Client/FBMRequest.cs b/lib/Net.Messaging.FBM/src/Client/FBMRequest.cs index f16a490..e545d55 100644 --- a/lib/Net.Messaging.FBM/src/Client/FBMRequest.cs +++ b/lib/Net.Messaging.FBM/src/Client/FBMRequest.cs @@ -277,9 +277,9 @@ namespace VNLib.Net.Messaging.FBM.Client public void Compile(ref ForwardOnlyWriter writer) { ReadOnlyMemory requestData = GetRequestData(); - writer.Append("Message ID:"); + writer.AppendSmall("Message ID:"); writer.Append(MessageId); - writer.Append(Environment.NewLine); + writer.AppendSmall(Environment.NewLine); Helpers.DefaultEncoding.GetChars(requestData.Span, ref writer); } /// diff --git a/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj b/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj index 667dfed..897bca5 100644 --- a/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj +++ b/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj @@ -2,14 +2,17 @@ net8.0 + enable VNLib.Net.Messaging.FBM VNLib.Net.Messaging.FBM - enable - latest-all True false + + latest-all + + VNLib.Net.Messaging.FBM Vaughn Nugent diff --git a/lib/Net.Rest.Client/src/Construction/Extensions.cs b/lib/Net.Rest.Client/src/Construction/Extensions.cs index ca0873b..93a1365 100644 --- a/lib/Net.Rest.Client/src/Construction/Extensions.cs +++ b/lib/Net.Rest.Client/src/Construction/Extensions.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: VNLib.Net.Rest.Client @@ -23,6 +23,7 @@ */ using System; +using System.IO; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -46,8 +47,11 @@ namespace VNLib.Net.Rest.Client.Construction /// The request entity model to send to the server /// A token to cancel the operation /// A task that resolves the response message + /// public static async Task ExecuteAsync(this IRestSiteAdapter site, TModel entity, CancellationToken cancellation = default) { + ArgumentNullException.ThrowIfNull(site); + //Get the adapter for the model IRestEndpointAdapter adapter = site.GetAdapter(); @@ -75,6 +79,44 @@ namespace VNLib.Net.Rest.Client.Construction return response; } + /// + /// Begins a stream download of the desired resource by sending the request model parameter. + /// An must be defined to handle requests of the given model type. + /// + /// WARNING: This function will not invoke the OnResponse handler functions after the stream + /// has been returned, there is no way to inspect the response when excuting a stream download + /// + /// + /// + /// + /// The request entity model to send to the server + /// A token to cancel the operation + /// A task that resolves the response data stream + public static async Task DownloadStreamAsync(this IRestSiteAdapter site, TModel entity, CancellationToken cancellation = default) + { + ArgumentNullException.ThrowIfNull(site); + + //Get the adapter for the model + IRestEndpointAdapter adapter = site.GetAdapter(); + + //Get new request on adapter + RestRequest request = adapter.GetRequest(entity); + + //Wait to exec operations if needed + await site.WaitAsync(cancellation); + + Stream? response; + + //Get rest client + using (ClientContract contract = site.GetClient()) + { + //Exec response + response = await contract.Resource.DownloadStreamAsync(request, cancellation); + } + + return response; + } + /// /// Executes a request against the site by sending the request model parameter. An must be /// defined to handle requests of the given model type. @@ -87,6 +129,8 @@ namespace VNLib.Net.Rest.Client.Construction /// A task that resolves the response message with json resonse support public static async Task> ExecuteAsync(this IRestSiteAdapter site, TModel entity, CancellationToken cancellation = default) { + ArgumentNullException.ThrowIfNull(site); + //Get the adapter for the model IRestEndpointAdapter adapter = site.GetAdapter(); @@ -124,6 +168,8 @@ namespace VNLib.Net.Rest.Client.Construction /// When completed, gets the public static async Task ExecuteSingleAsync(this IRestSiteAdapter site, TModel model, CancellationToken cancellation = default) where TModel : IRestSingleEndpoint { + ArgumentNullException.ThrowIfNull(site); + //Init new request RestRequest request = new(model.Url, model.Method); model.OnRequest(request); @@ -149,6 +195,7 @@ namespace VNLib.Net.Rest.Client.Construction return response; } + /// /// Sets the request method of a new request /// @@ -358,22 +405,47 @@ namespace VNLib.Net.Rest.Client.Construction /// The json response entity type /// The response task /// A task that resolves the deserialized entity type - public static async Task AsJson(this Task response) + public static Task AsJson(this Task response) + => As(response, static r => JsonSerializer.Deserialize(r.RawBytes)); + + /// + /// Converts a task that resolves a to a task that deserializes + /// the response data as json. + /// + /// The response task + /// A task that resolves the deserialized entity type + public static Task AsBytes(this Task response) => As(response, static p => p.RawBytes); + + /// + /// Converts a task that resolves a to a task that uses your + /// transformation function to create the result + /// + /// The response task + /// Your custom callback function used to transform the data + /// A task that resolves the deserialized entity type + public static async Task As(this Task response, Func> callback) { + ArgumentNullException.ThrowIfNull(response); + ArgumentNullException.ThrowIfNull(callback); + RestResponse r = await response.ConfigureAwait(false); - return JsonSerializer.Deserialize(r.RawBytes); + return await callback(r).ConfigureAwait(false); } /// - /// Converts a task that resolves a to a task that deserializes - /// the response data as json. + /// Converts a task that resolves a to a task that uses your + /// transformation function to create the result /// /// The response task + /// Your custom callback function used to transform the data /// A task that resolves the deserialized entity type - public static async Task AsBytes(this Task response) + public static async Task As(this Task response, Func callback) { + ArgumentNullException.ThrowIfNull(response); + ArgumentNullException.ThrowIfNull(callback); + RestResponse r = await response.ConfigureAwait(false); - return r.RawBytes; + return callback(r); } private record class EndpointAdapterBuilder(IRestSiteEndpointStore Site) : IRestEndpointBuilder @@ -396,8 +468,8 @@ namespace VNLib.Net.Rest.Client.Construction /// public IRestRequestBuilder WithModifier(Action requestBuilder) { - _ = requestBuilder ?? throw new ArgumentNullException(nameof(requestBuilder)); - //Add handler to handler chain + ArgumentNullException.ThrowIfNull(requestBuilder); + Adapter.RequestChain.AddLast(requestBuilder); return this; } @@ -405,8 +477,8 @@ namespace VNLib.Net.Rest.Client.Construction /// public IRestRequestBuilder WithUrl(Func uriBuilder) { - _ = uriBuilder ?? throw new ArgumentNullException(nameof(uriBuilder)); - //Add get url handler + ArgumentNullException.ThrowIfNull(uriBuilder); + Adapter.GetUrl = uriBuilder; return this; } @@ -414,8 +486,8 @@ namespace VNLib.Net.Rest.Client.Construction /// public IRestRequestBuilder OnResponse(Action onResponseBuilder) { - _ = onResponseBuilder ?? throw new ArgumentNullException(nameof(onResponseBuilder)); - //Add a response handler + ArgumentNullException.ThrowIfNull(onResponseBuilder); + Adapter.ResponseChain.AddLast(onResponseBuilder); return this; } diff --git a/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj b/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj index c7a4151..b127800 100644 --- a/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj +++ b/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj @@ -6,10 +6,13 @@ VNLib.Net.Rest.Client VNLib.Net.Rest.Client True - latest-all false + + latest-all + + VNLib.Net.Rest.Client Vaughn Nugent diff --git a/lib/Net.Transport.SimpleTCP/src/SocketPipeLineWorker.cs b/lib/Net.Transport.SimpleTCP/src/SocketPipeLineWorker.cs index b6df58c..cb3486f 100644 --- a/lib/Net.Transport.SimpleTCP/src/SocketPipeLineWorker.cs +++ b/lib/Net.Transport.SimpleTCP/src/SocketPipeLineWorker.cs @@ -562,16 +562,10 @@ namespace VNLib.Net.Transport.Tcp void Stop(); } - private readonly struct TpTimerWrapper : INetTimer + private readonly struct TpTimerWrapper(Timer timer, int timeout) : INetTimer { - private readonly Timer _timer; - private readonly int _timeout; - - public TpTimerWrapper(Timer timer, int timeout) - { - _timer = timer; - _timeout = timeout; - } + private readonly Timer _timer = timer; + private readonly int _timeout = timeout; public readonly void Start() => _timer.Restart(_timeout); diff --git a/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj b/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj index e999072..630a0db 100644 --- a/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj +++ b/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj @@ -2,14 +2,17 @@ net8.0 + enable VNLib.Net.Transport VNLib.Net.Transport.SimpleTCP - enable True - latest-all false + + latest-all + + VNLib.Net.Transport.SimpleTCP VNLib Simple Transport Library diff --git a/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj b/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj index 7dc12b6..4aedb80 100644 --- a/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj +++ b/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj @@ -2,15 +2,17 @@ net8.0 + enable VNLib.Plugins.Essentials.ServiceStack VNLib.Plugins.Essentials.ServiceStack - enable True - README.md - latest-all false + + latest-all + + Vaughn Nugent Vaughn Nugent @@ -20,6 +22,7 @@ https://www.vaughnnugent.com/resources/software/modules/VNLib.Core https://github.com/VnUgE/VNLib.Core/tree/main/lib/Plugins.Essentials.ServiceStack LICENSE + README.md True diff --git a/lib/Plugins.Essentials/src/Accounts/PasswordHashing.cs b/lib/Plugins.Essentials/src/Accounts/PasswordHashing.cs index e6b9f24..6c5ebcc 100644 --- a/lib/Plugins.Essentials/src/Accounts/PasswordHashing.cs +++ b/lib/Plugins.Essentials/src/Accounts/PasswordHashing.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: VNLib.Plugins.Essentials @@ -29,6 +29,15 @@ using VNLib.Hashing; using VNLib.Utils; using VNLib.Utils.Memory; +/* + * Some stuff to note + * + * Functions have explicit parameters to avoid accidental buffer mixup + * when calling nested/overload functions. Please keep it that way for now + * I really want to avoid a whoopsie in password hasing. + */ + + namespace VNLib.Plugins.Essentials.Accounts { @@ -59,7 +68,8 @@ namespace VNLib.Plugins.Essentials.Accounts /// The password secret provider /// The configuration setup arguments /// The instance of the library to use - public static PasswordHashing Create(IArgon2Library library, ISecretProvider secret, in Argon2ConfigParams setup) => new (library, secret, setup); + public static PasswordHashing Create(IArgon2Library library, ISecretProvider secret, in Argon2ConfigParams setup) + => new (library, secret, in setup); /// /// Creates a new instance using the default @@ -69,7 +79,8 @@ namespace VNLib.Plugins.Essentials.Accounts /// The configuration setup arguments /// The instance of the library to use /// - public static PasswordHashing Create(ISecretProvider secret, in Argon2ConfigParams setup) => Create(VnArgon2.GetOrLoadSharedLib(), secret, in setup); + public static PasswordHashing Create(ISecretProvider secret, in Argon2ConfigParams setup) + => Create(VnArgon2.GetOrLoadSharedLib(), secret, in setup); private Argon2CostParams GetCostParams() { @@ -93,15 +104,18 @@ namespace VNLib.Plugins.Essentials.Accounts if(_secret.BufferSize < STACK_MAX_BUFF_SIZE) { - //Alloc stack buffer + /* + * Also always alloc fixed buffer size again to help + * be less obvious during process allocations + */ Span secretBuffer = stackalloc byte[STACK_MAX_BUFF_SIZE]; return VerifyInternal(passHash, password, secretBuffer); } else { - //Alloc heap buffer - using UnsafeMemoryHandle secretBuffer = MemoryUtil.UnsafeAlloc(_secret.BufferSize, true); + + using UnsafeMemoryHandle secretBuffer = AllocSecretBuffer(); return VerifyInternal(passHash, password, secretBuffer.Span); } @@ -111,10 +125,10 @@ namespace VNLib.Plugins.Essentials.Accounts { try { - //Get the secret from the callback - ERRNO count = _secret.GetSecret(secretBuffer); - //Verify - return _argon2.Verify2id(password, passHash, secretBuffer[..(int)count]); + + ERRNO secretSize = _secret.GetSecret(secretBuffer); + + return _argon2.Verify2id(password, passHash, secretBuffer[..(int)secretSize]); } finally { @@ -135,11 +149,9 @@ namespace VNLib.Plugins.Essentials.Accounts public bool Verify(ReadOnlySpan hash, ReadOnlySpan salt, ReadOnlySpan password) { if (hash.Length < STACK_MAX_BUFF_SIZE) - { - //Alloc stack buffer + { Span hashBuf = stackalloc byte[hash.Length]; - - //Hash the password with the current config + Hash(password, salt, hashBuf); //Compare the hashed password to the specified hash and return results @@ -148,8 +160,7 @@ namespace VNLib.Plugins.Essentials.Accounts else { using UnsafeMemoryHandle hashBuf = MemoryUtil.UnsafeAlloc(hash.Length, true); - - //Hash the password with the current config + Hash(password, salt, hashBuf.Span); //Compare the hashed password to the specified hash and return results @@ -165,7 +176,7 @@ namespace VNLib.Plugins.Essentials.Accounts Argon2CostParams costParams = GetCostParams(); //Alloc shared buffer for the salt and secret buffer - using UnsafeMemoryHandle buffer = MemoryUtil.UnsafeAlloc(_config.SaltLen + _secret.BufferSize, true); + using UnsafeMemoryHandle buffer = MemoryUtil.UnsafeAllocNearestPage(_config.SaltLen + _secret.BufferSize, true); //Split buffers Span saltBuf = buffer.Span[.._config.SaltLen]; @@ -175,12 +186,16 @@ namespace VNLib.Plugins.Essentials.Accounts RandomHash.GetRandomBytes(saltBuf); try - { - //recover the secret + { ERRNO count = _secret.GetSecret(secretBuf); - - //Hashes a password, with the current parameters - return (PrivateString)_argon2.Hash2id(password, saltBuf, secretBuf[..(int)count], in costParams, _config.HashLen); + + return (PrivateString)_argon2.Hash2id( + password: password, + salt: saltBuf, + secret: secretBuf[..(int)count], + costParams: in costParams, + hashLen: _config.HashLen + ); } finally { @@ -201,7 +216,10 @@ namespace VNLib.Plugins.Essentials.Accounts Span saltBuf = buffer.Span[.._config.SaltLen]; Span secretBuf = buffer.Span[_config.SaltLen..]; - //Fill the buffer with random bytes + /* + * Salt is just crypographically secure random + * data. + */ RandomHash.GetRandomBytes(saltBuf); try @@ -210,7 +228,13 @@ namespace VNLib.Plugins.Essentials.Accounts ERRNO count = _secret.GetSecret(secretBuf); //Hashes a password, with the current parameters - return (PrivateString)_argon2.Hash2id(password, saltBuf, secretBuf[..(int)count], in costParams, _config.HashLen); + return (PrivateString)_argon2.Hash2id( + password: password, + salt: saltBuf, + secret: secretBuf[..(int)count], + costParams: in costParams, + hashLen: _config.HashLen + ); } finally { @@ -229,20 +253,28 @@ namespace VNLib.Plugins.Essentials.Accounts public void Hash(ReadOnlySpan password, ReadOnlySpan salt, Span hashOutput) { Argon2CostParams costParams = GetCostParams(); + + using UnsafeMemoryHandle secretBuffer = AllocSecretBuffer(); - //alloc secret buffer - using UnsafeMemoryHandle secretBuffer = MemoryUtil.UnsafeAllocNearestPage(_secret.BufferSize, true); try { - //Get the secret from the callback - ERRNO count = _secret.GetSecret(secretBuffer.Span); - //Hashes a password, with the current parameters - _argon2.Hash2id(password, salt, secretBuffer.Span[..(int)count], hashOutput, in costParams); + ERRNO secretSize = _secret.GetSecret(secretBuffer.Span); + + _argon2.Hash2id( + password: password, + salt: salt, + secret: secretBuffer.AsSpan(0, secretSize), + rawHashOutput: hashOutput, + costParams: in costParams + ); } finally { //Erase secret buffer - MemoryUtil.InitializeBlock(ref secretBuffer.GetReference(), secretBuffer.IntLength); + MemoryUtil.InitializeBlock( + ref secretBuffer.GetReference(), + secretBuffer.IntLength + ); } } @@ -290,6 +322,12 @@ namespace VNLib.Plugins.Essentials.Accounts } } + /* + * Always alloc page aligned to help keep block allocations + * a little less obvious. + */ + private UnsafeMemoryHandle AllocSecretBuffer() => MemoryUtil.UnsafeAllocNearestPage(_secret.BufferSize, true); + private readonly ref struct HashBufferSegments { public readonly Span SaltBuffer; diff --git a/lib/Plugins.Essentials/src/Endpoints/SemiConsistentVeTable.cs b/lib/Plugins.Essentials/src/Endpoints/SemiConsistentVeTable.cs new file mode 100644 index 0000000..09ab151 --- /dev/null +++ b/lib/Plugins.Essentials/src/Endpoints/SemiConsistentVeTable.cs @@ -0,0 +1,187 @@ +/* +* Copyright (c) 2024 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Plugins.Essentials +* File: SemiConsistentVeTable.cs +* +* SemiConsistentVeTable.cs is part of VNLib.Plugins.Essentials which +* is part of the larger VNLib collection of libraries and utilities. +* +* VNLib.Plugins.Essentials is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Plugins.Essentials is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; + +using VNLib.Net.Http; + +namespace VNLib.Plugins.Essentials.Endpoints +{ + internal sealed class SemiConsistentVeTable : IVirtualEndpointTable + { + + /* + * The VE table is read-only for the processor and my only + * be updated by the application via the methods below + * + * Since it would be very inefficient to track endpoint users + * using locks, we can assume any endpoint that is currently + * processing requests cannot be stopped, so we just focus on + * swapping the table when updates need to be made. + * + * This means calls to modify the table will read the table + * (clone it), modify the local copy, then exhange it for + * the active table so new requests will be processed on the + * new table. + * + * To make the calls to modify the table thread safe, a lock is + * held while modification operations run, then the updated + * copy is published. Any threads reading the old table + * will continue to use a stale endpoint. + */ + + /// + /// A "lookup table" that represents virtual endpoints to be processed when an + /// incomming connection matches its path parameter + /// + private FrozenDictionary> VirtualEndpoints = + new Dictionary>(StringComparer.OrdinalIgnoreCase) + .ToFrozenDictionary(); + + private bool _isEmpty = true; + + /* + * A lock that is held by callers that intend to + * modify the vep table at the same time + */ + private readonly object VeUpdateLock = new(); + + /// + public bool IsEmpty => _isEmpty; + + + /// + public void AddEndpoint(params IEndpoint[] endpoints) + { + //Check + ArgumentNullException.ThrowIfNull(endpoints); + //Make sure all endpoints specify a path + if (endpoints.Any(static e => string.IsNullOrWhiteSpace(e?.Path))) + { + throw new ArgumentException("Endpoints array contains one or more empty endpoints"); + } + + if (endpoints.Length == 0) + { + return; + } + + //Get virtual endpoints + IEnumerable> eps = endpoints + .Where(static e => e is IVirtualEndpoint) + .Select(static e => (IVirtualEndpoint)e); + + //Get http event endpoints and create wrapper classes for conversion + IEnumerable> evs = endpoints + .Where(static e => e is IVirtualEndpoint) + .Select(static e => new EvEndpointWrapper((e as IVirtualEndpoint)!)); + + //Uinion endpoints by their paths to combine them + IEnumerable> allEndpoints = eps.UnionBy(evs, static s => s.Path); + + //Only allow 1 thread at a time to mutate the table + lock (VeUpdateLock) + { + //Clone the current dictonary + Dictionary> newTable = new(VirtualEndpoints, StringComparer.OrdinalIgnoreCase); + //Insert the new eps, and/or overwrite old eps + foreach (IVirtualEndpoint ep in allEndpoints) + { + newTable.Add(ep.Path, ep); + } + + //Update is-empty flag + _isEmpty = newTable.Count == 0; + + //Create the new table and store the entire table + _ = Interlocked.Exchange(ref VirtualEndpoints, newTable.ToFrozenDictionary(StringComparer.OrdinalIgnoreCase)); + } + } + + /// + public void RemoveEndpoint(params IEndpoint[] eps) + { + ArgumentNullException.ThrowIfNull(eps); + //Call remove on path + RemoveEndpoint(eps.Select(static s => s.Path).ToArray()); + } + + /// + public void RemoveEndpoint(params string[] paths) + { + ArgumentNullException.ThrowIfNull(paths); + + //Make sure all endpoints specify a path + if (paths.Any(static e => string.IsNullOrWhiteSpace(e))) + { + throw new ArgumentException("Paths array contains one or more empty strings"); + } + + if (paths.Length == 0) + { + return; + } + + //take update lock + lock (VeUpdateLock) + { + //Clone the current dictonary + Dictionary> newTable = new(VirtualEndpoints, StringComparer.OrdinalIgnoreCase); + + foreach (string eps in paths) + { + _ = newTable.Remove(eps); + } + + //Update is-empty flag + _isEmpty = newTable.Count == 0; + + //Store the new table + _ = Interlocked.Exchange(ref VirtualEndpoints, newTable.ToFrozenDictionary(StringComparer.OrdinalIgnoreCase)); + } + } + + /// + public bool TryGetEndpoint(string path, [NotNullWhen(true)] out IVirtualEndpoint? endpoint) + => VirtualEndpoints.TryGetValue(path, out endpoint); + + + /* + * Wrapper class for converting IHttpEvent endpoints to + * httpEntityEndpoints + */ + private sealed class EvEndpointWrapper(IVirtualEndpoint Wrapped) : IVirtualEndpoint + { + string IEndpoint.Path => Wrapped.Path; + + ValueTask IVirtualEndpoint.Process(HttpEntity entity) => Wrapped.Process(entity); + } + } +} \ No newline at end of file diff --git a/lib/Plugins.Essentials/src/EventProcessor.cs b/lib/Plugins.Essentials/src/EventProcessor.cs index f052c56..ba7aa3c 100644 --- a/lib/Plugins.Essentials/src/EventProcessor.cs +++ b/lib/Plugins.Essentials/src/EventProcessor.cs @@ -28,7 +28,6 @@ using System.Net; using System.Threading; using System.Net.Sockets; using System.Threading.Tasks; -using System.Collections.Generic; using System.Collections.Immutable; using System.Runtime.CompilerServices; @@ -40,8 +39,8 @@ using VNLib.Plugins.Essentials.Accounts; using VNLib.Plugins.Essentials.Content; using VNLib.Plugins.Essentials.Sessions; using VNLib.Plugins.Essentials.Extensions; -using VNLib.Plugins.Essentials.Middleware; using VNLib.Plugins.Essentials.Endpoints; +using VNLib.Plugins.Essentials.Middleware; #pragma warning disable CA2007 // Consider calling ConfigureAwait on the awaited task @@ -133,7 +132,8 @@ namespace VNLib.Plugins.Essentials /// The internal service pool for the processor /// protected readonly HttpProcessorServicePool ServicePool = new([ - typeof(ISessionProvider), //Order must match the indexes above + //Order must match the indexes above + typeof(ISessionProvider), typeof(IPageRouter), typeof(IAccountSecurityProvider) ]); @@ -157,6 +157,8 @@ namespace VNLib.Plugins.Essentials get => ServicePool.ExchangeVersion(ref _accountSec, SEC_INDEX); } + private readonly MiddlewareController _middleware = new(config); + /// public virtual async ValueTask ClientConnectedAsync(IHttpEvent httpEvent) { @@ -169,8 +171,6 @@ namespace VNLib.Plugins.Essentials ISessionProvider? sessions = ServicePool.ExchangeVersion(ref _sessions, SESS_INDEX); IPageRouter? router = ServicePool.ExchangeVersion(ref _router, ROUTER_INDEX); - LinkedListNode? mwNode = config.MiddlewareChain.GetCurrentHead(); - //event cancellation token HttpEntity entity = new(httpEvent, this); @@ -205,24 +205,10 @@ namespace VNLib.Plugins.Essentials goto RespondAndExit; } - //Loop through nodes - while(mwNode != null) + //Exec middleware + if(!await _middleware.ProcessAsync(entity)) { - //Invoke mw handler on our event - entity.EventArgs = await mwNode.ValueRef.ProcessAsync(entity); - - switch (entity.EventArgs.Routine) - { - //move next if continue is returned - case FpRoutine.Continue: - break; - - //Middleware completed the connection, time to exit - default: - goto RespondAndExit; - } - - mwNode = mwNode.Next; + goto RespondAndExit; } if (!config.EndpointTable.IsEmpty) @@ -257,6 +243,9 @@ namespace VNLib.Plugins.Essentials RespondAndExit: + //Normal post-process + _middleware.PostProcess(entity); + //Call post processor method PostProcessEntity(entity, ref entity.EventArgs); } @@ -744,5 +733,5 @@ namespace VNLib.Plugins.Essentials return arr; } } - } -} \ No newline at end of file + } +} diff --git a/lib/Plugins.Essentials/src/EventProcessorConfig.cs b/lib/Plugins.Essentials/src/EventProcessorConfig.cs index 8f401ac..6e101eb 100644 --- a/lib/Plugins.Essentials/src/EventProcessorConfig.cs +++ b/lib/Plugins.Essentials/src/EventProcessorConfig.cs @@ -29,6 +29,7 @@ using System.Collections.Frozen; using System.Collections.Generic; using VNLib.Utils.Logging; +using VNLib.Plugins.Essentials.Endpoints; using VNLib.Plugins.Essentials.Middleware; namespace VNLib.Plugins.Essentials diff --git a/lib/Plugins.Essentials/src/Extensions/ConnectionInfoExtensions.cs b/lib/Plugins.Essentials/src/Extensions/ConnectionInfoExtensions.cs index a99b1ab..64a9611 100644 --- a/lib/Plugins.Essentials/src/Extensions/ConnectionInfoExtensions.cs +++ b/lib/Plugins.Essentials/src/Extensions/ConnectionInfoExtensions.cs @@ -114,6 +114,7 @@ namespace VNLib.Plugins.Essentials.Extensions /// true if the connection accepts any content typ, false otherwise private static bool AcceptsAny(IConnectionInfo server) { + // If no accept header is sent by clients, it is assumed it accepts all content types if(server.Accept.Count == 0) { return true; @@ -196,14 +197,15 @@ namespace VNLib.Plugins.Essentials.Extensions //Alloc enough space to hold the string Span buffer = stackalloc char[64]; ForwardOnlyWriter rangeBuilder = new(buffer); + //Build the range header in this format "bytes -/" - rangeBuilder.Append("bytes "); + rangeBuilder.AppendSmall("bytes "); rangeBuilder.Append(start); rangeBuilder.Append('-'); rangeBuilder.Append(end); rangeBuilder.Append('/'); rangeBuilder.Append(length); - //Print to a string and set the content range header + entity.Server.Headers[HttpResponseHeader.ContentRange] = rangeBuilder.ToString(); } @@ -212,7 +214,8 @@ namespace VNLib.Plugins.Essentials.Extensions /// /// true if the user-agent specified the cors security header [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsCors(this IConnectionInfo server) => "cors".Equals(server.Headers[SEC_HEADER_MODE], StringComparison.OrdinalIgnoreCase); + public static bool IsCors(this IConnectionInfo server) + => string.Equals("cors", server.Headers[SEC_HEADER_MODE], StringComparison.OrdinalIgnoreCase); /// /// Determines if the User-Agent specified "cross-site" in the Sec-Site header, OR @@ -223,8 +226,8 @@ namespace VNLib.Plugins.Essentials.Extensions [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsCrossSite(this IConnectionInfo server) { - return "cross-site".Equals(server.Headers[SEC_HEADER_SITE], StringComparison.OrdinalIgnoreCase) - || (server.Origin != null && !server.RequestUri.DnsSafeHost.Equals(server.Origin.DnsSafeHost, StringComparison.Ordinal)); + return string.Equals("cross-site", server.Headers[SEC_HEADER_SITE], StringComparison.OrdinalIgnoreCase) + || (server.Origin != null && ! string.Equals(server.RequestUri.DnsSafeHost, server.Origin.DnsSafeHost, StringComparison.Ordinal)); } /// @@ -233,14 +236,16 @@ namespace VNLib.Plugins.Essentials.Extensions /// /// true if sec-user header was set to "?1" [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsUserInvoked(this IConnectionInfo server) => "?1".Equals(server.Headers[SEC_HEADER_USER], StringComparison.OrdinalIgnoreCase); + public static bool IsUserInvoked(this IConnectionInfo server) + => string.Equals("?1", server.Headers[SEC_HEADER_USER], StringComparison.OrdinalIgnoreCase); /// /// Was this request created from normal user navigation /// /// true if sec-mode set to "navigate" [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsNavigation(this IConnectionInfo server) => "navigate".Equals(server.Headers[SEC_HEADER_MODE], StringComparison.OrdinalIgnoreCase); + public static bool IsNavigation(this IConnectionInfo server) + => string.Equals("navigate", server.Headers[SEC_HEADER_MODE], StringComparison.OrdinalIgnoreCase); /// /// Determines if the client specified "no-cache" for the cache control header, signalling they do not wish to cache the entity @@ -302,7 +307,11 @@ namespace VNLib.Plugins.Essentials.Extensions [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool RefererMatch(this IConnectionInfo server) { - return server.RequestUri.DnsSafeHost.Equals(server.Referer?.DnsSafeHost, StringComparison.OrdinalIgnoreCase); + return string.Equals( + server.RequestUri.DnsSafeHost, + server.Referer?.DnsSafeHost, + StringComparison.OrdinalIgnoreCase + ); } /// @@ -315,9 +324,25 @@ namespace VNLib.Plugins.Essentials.Extensions /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ExpireCookie(this IConnectionInfo server, string name, string domain = "", string path = "/", CookieSameSite sameSite = CookieSameSite.None, bool secure = false) + public static void ExpireCookie( + this IConnectionInfo server, + string name, + string domain = "", + string path = "/", + CookieSameSite sameSite = CookieSameSite.None, + bool secure = false + ) { - server.SetCookie(name, string.Empty, domain, path, TimeSpan.Zero, sameSite, false, secure); + SetCookie( + server: server, + name: name, + value: string.Empty, + domain: domain, + path: path, + expires: TimeSpan.Zero, + sameSite: sameSite, + secure: secure + ); } /// @@ -340,9 +365,20 @@ namespace VNLib.Plugins.Essentials.Extensions string path = "/", CookieSameSite sameSite = CookieSameSite.None, bool httpOnly = false, - bool secure = false) + bool secure = false + ) { - server.SetCookie(name, value, domain, path, TimeSpan.MaxValue, sameSite, httpOnly, secure); + SetCookie( + server: server, + name: name, + value: value, + domain: domain, + path: path, + expires: TimeSpan.Zero, + sameSite: sameSite, + httpOnly: httpOnly, + secure: secure + ); } /// @@ -367,9 +403,24 @@ namespace VNLib.Plugins.Essentials.Extensions string path = "/", CookieSameSite sameSite = CookieSameSite.None, bool httpOnly = false, - bool secure = false) + bool secure = false + ) { - server.SetCookie(name, value, domain, path, expires, sameSite, httpOnly, secure); + + HttpResponseCookie cookie = new(name) + { + Value = value, + Domain = domain, + Path = path, + MaxAge = expires, + IsSession = expires == TimeSpan.MaxValue, + //If the connection is cross origin, then we need to modify the secure and samsite values + SameSite = sameSite, + HttpOnly = httpOnly, + Secure = secure | server.CrossOrigin, + }; + + server.SetCookie(in cookie); } @@ -380,35 +431,24 @@ namespace VNLib.Plugins.Essentials.Extensions /// The cookie to set for the server /// [MethodImpl(MethodImplOptions.AggressiveInlining)] + [Obsolete("HttpCookie type is obsolete in favor of HttpResponseCookie")] public static void SetCookie(this IConnectionInfo server, in HttpCookie cookie) { - //Cookie name is required - if(string.IsNullOrWhiteSpace(cookie.Name)) - { - throw new ArgumentException("A nonn-null cookie name is required"); - } - //Set the cookie - server.SetCookie(cookie.Name, - cookie.Value, - cookie.Domain, - cookie.Path, - cookie.ValidFor, - cookie.SameSite, - cookie.HttpOnly, - cookie.Secure); - } - - /// - /// Is the current connection a "browser" ? - /// - /// - /// true if the user agent string contains "Mozilla" and does not contain "bot", false otherwise - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsBrowser(this IConnectionInfo server) - { - //Get user-agent and determine if its a browser - return server.UserAgent != null && !server.UserAgent.Contains("bot", StringComparison.OrdinalIgnoreCase) && server.UserAgent.Contains("Mozilla", StringComparison.OrdinalIgnoreCase); + HttpResponseCookie rCookie = new(cookie.Name) + { + Value = cookie.Value, + Domain = cookie.Domain, + Path = cookie.Path, + MaxAge = cookie.ValidFor, + IsSession = cookie.ValidFor == TimeSpan.MaxValue, + //If the connection is cross origin, then we need to modify the secure and samsite values + SameSite = cookie.SameSite, + HttpOnly = cookie.HttpOnly, + Secure = cookie.Secure | server.CrossOrigin, + }; + + server.SetCookie(in rCookie); } /// @@ -417,12 +457,9 @@ namespace VNLib.Plugins.Essentials.Extensions /// /// True of the connection was made from the local machine [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsLoopBack(this IConnectionInfo server) - { - IPAddress realIp = server.GetTrustedIp(); - return IPAddress.Any.Equals(realIp) || IPAddress.Loopback.Equals(realIp); - } - + public static bool IsLoopBack(this IConnectionInfo server) + => IPAddress.Loopback.Equals(GetTrustedIp(server)); + /// /// Did the connection set the dnt header? /// @@ -493,7 +530,7 @@ namespace VNLib.Plugins.Essentials.Extensions //Standard https protocol header string? protocol = server.Headers[X_FORWARDED_PROTO_HEADER]; //If the header is set and equals https then tls is being used - return string.IsNullOrWhiteSpace(protocol) ? isSecure : "https".Equals(protocol, StringComparison.OrdinalIgnoreCase); + return string.IsNullOrWhiteSpace(protocol) ? isSecure : string.Equals("https", protocol, StringComparison.OrdinalIgnoreCase); } else { diff --git a/lib/Plugins.Essentials/src/Extensions/EssentialHttpEventExtensions.cs b/lib/Plugins.Essentials/src/Extensions/EssentialHttpEventExtensions.cs index 8adf883..0ca5b8f 100644 --- a/lib/Plugins.Essentials/src/Extensions/EssentialHttpEventExtensions.cs +++ b/lib/Plugins.Essentials/src/Extensions/EssentialHttpEventExtensions.cs @@ -796,6 +796,66 @@ namespace VNLib.Plugins.Essentials.Extensions //Parse the file using the specified parser return parser(file.FileData, file.ContentTypeString()); } + + /// + /// Reads the contents of an uploaded file at the desired intex into memory + /// and returns a managed byte array containing the file data + /// + /// + /// The index of the uploaded file to buffer + /// A value task that resolves the uploaded data + /// + public static ValueTask ReadFileDataAsync(this HttpEntity ev, int uploadIndex = 0) + { + ArgumentNullException.ThrowIfNull(ev); + + /* + * File should exist at the desired index and have a length greater than 0 + * otherwise return an empty buffer + */ + if (ev.Files.Count <= uploadIndex || ev.Files[uploadIndex].Length == 0) + { + return ValueTask.FromResult(Array.Empty()); + } + + return ReadFileDataAsync(ev, uploadIndex); + + static async ValueTask ReadFileDataAsync(HttpEntity entity, int fileIndex) + { + FileUpload upload = entity.Files[fileIndex]; + + /* + * Alloc an uninitialized buffer to read the file data into, it should ALL + * be overwritten during read operation + */ + byte[] buffer = GC.AllocateUninitializedArray((int)upload.Length); + + int read = 0; + + do + { + Memory mem = buffer.AsMemory(read, buffer.Length - read); + + int r = await upload.FileData.ReadAsync(mem, entity.EventCancellation); + + //If no data was read force break and deal with read data + if (r == 0) + { + break; + } + + read += r; + } while (read < buffer.Length); + + //Buffer is exact length, so read should be equal to length + if (read != buffer.Length) + { + throw new IOException("Failed to read entire file data, this may be an internal error"); + } + + return buffer; + } + } /// /// Get a instance that points to the current sites filesystem root. @@ -816,12 +876,12 @@ namespace VNLib.Plugins.Essentials.Extensions public static string ContentTypeString(this in FileUpload upload) => HttpHelpers.GetContentTypeString(upload.ContentType); /// - /// Sets the flag on the current + /// Sets the flag on the current /// instance to disable dynamic compression on the response. /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void DisableCompression(this IHttpEvent entity) => entity.SetControlFlag(HttpControlMask.CompressionDisabed); + public static void DisableCompression(this IHttpEvent entity) => entity.SetControlFlag(HttpControlMask.CompressionDisabled); /// /// Attempts to upgrade the connection to a websocket, if the setup fails, it sets up the response to the client accordingly. diff --git a/lib/Plugins.Essentials/src/Extensions/HttpCookie.cs b/lib/Plugins.Essentials/src/Extensions/HttpCookie.cs index 6158a69..19c8e78 100644 --- a/lib/Plugins.Essentials/src/Extensions/HttpCookie.cs +++ b/lib/Plugins.Essentials/src/Extensions/HttpCookie.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: VNLib.Plugins.Essentials @@ -33,6 +33,7 @@ namespace VNLib.Plugins.Essentials.Extensions /// /// The cookie name /// The cookie value + [Obsolete("Obsolete in favor of HttpResponseCookie")] public readonly record struct HttpCookie (string Name, string Value) { /// diff --git a/lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs b/lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs index f3b02dc..ef86934 100644 --- a/lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs +++ b/lib/Plugins.Essentials/src/Extensions/SingleCookieController.cs @@ -94,15 +94,19 @@ namespace VNLib.Plugins.Essentials.Extensions //Only set cooke if already exists or force is true if (entity.Server.RequestCookies.ContainsKey(Name) || force) { - //Build and set cookie - HttpCookie cookie = new(Name, value) + HttpResponseCookie cookie = new(Name) { - Secure = Secure, - HttpOnly = HttpOnly, - ValidFor = ValidFor, - SameSite = SameSite, + Value = value, + Domain = Domain, Path = Path, - Domain = Domain + //Only set max-age if cookie has a value, otherwise set to zero to expire + MaxAge = string.IsNullOrWhiteSpace(value) ? TimeSpan.Zero : ValidFor, + IsSession = ValidFor == TimeSpan.MaxValue, + SameSite = SameSite, + HttpOnly = HttpOnly, + + //Secure is required on cross origin requests + Secure = Secure | entity.Server.CrossOrigin, }; entity.Server.SetCookie(in cookie); diff --git a/lib/Plugins.Essentials/src/HttpEntity.cs b/lib/Plugins.Essentials/src/HttpEntity.cs index 2a24982..ff728e3 100644 --- a/lib/Plugins.Essentials/src/HttpEntity.cs +++ b/lib/Plugins.Essentials/src/HttpEntity.cs @@ -26,6 +26,7 @@ using System; using System.IO; using System.Net; using System.Threading; +using System.Diagnostics; using System.Collections.Generic; using System.Runtime.CompilerServices; @@ -204,6 +205,27 @@ namespace VNLib.Plugins.Essentials throw new ContentTypeUnacceptableException("The client does not accept the content type of the response"); } + /* + * If the underlying stream is actaully a memory stream, + * create a wrapper for it to read as a memory response. + * This is done to avoid a user-space copy since we can + * get access to access the internal buffer + * + * Stream length also should not cause an integer overflow, + * which also mean position is assumed not to overflow + * or cause an overflow during reading + */ + if(stream is MemoryStream ms && length < int.MaxValue) + { + Entity.CloseResponse( + code, + type, + new MemStreamWrapper(ms, (int)length) + ); + + return; + } + Entity.CloseResponse(code, type, stream, length); } @@ -246,5 +268,37 @@ namespace VNLib.Plugins.Essentials /// [MethodImpl(MethodImplOptions.AggressiveInlining)] void IHttpEvent.DangerousChangeProtocol(IAlternateProtocol protocolHandler) => Entity.DangerousChangeProtocol(protocolHandler); + + + private sealed class MemStreamWrapper(MemoryStream memStream, int length) : IMemoryResponseReader + { + readonly int length = length; + + /* + * Stream may be offset by the caller, it needs + * to be respected during streaming. + */ + int read = (int)memStream.Position; + + public int Remaining + { + get + { + Debug.Assert(length - read >= 0); + return length - read; + } + } + + public void Advance(int written) => read += written; + + /// + public void Close() => memStream.Dispose(); + + public ReadOnlyMemory GetMemory() + { + byte[] intBuffer = memStream.GetBuffer(); + return new ReadOnlyMemory(intBuffer, read, Remaining); + } + } } } diff --git a/lib/Plugins.Essentials/src/Middleware/IHttpMiddleware.cs b/lib/Plugins.Essentials/src/Middleware/IHttpMiddleware.cs index 83e6a06..990d59b 100644 --- a/lib/Plugins.Essentials/src/Middleware/IHttpMiddleware.cs +++ b/lib/Plugins.Essentials/src/Middleware/IHttpMiddleware.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: VNLib.Plugins.Essentials @@ -40,5 +40,19 @@ namespace VNLib.Plugins.Essentials.Middleware /// The entity to process /// The result of the operation ValueTask ProcessAsync(HttpEntity entity); + + /// + /// Post processes an HTTP entity with possible file selection. May optionally mutate the + /// current arguments before the event processor completes a response. + /// + /// The entity that has been processes and is ready to close + /// The current file processor arguments + /// + /// Generally this function should simply observe results as the entity may already have been + /// configured for a response, such as by a virtual routine. You should inspect the current arguments + /// before mutating the reference. + /// + virtual void VolatilePostProcess(HttpEntity entity, ref FileProcessArgs currentArgs) + { } } } diff --git a/lib/Plugins.Essentials/src/Middleware/MiddlewareController.cs b/lib/Plugins.Essentials/src/Middleware/MiddlewareController.cs new file mode 100644 index 0000000..c3a85c9 --- /dev/null +++ b/lib/Plugins.Essentials/src/Middleware/MiddlewareController.cs @@ -0,0 +1,88 @@ +/* +* Copyright (c) 2024 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Plugins.Essentials +* File: MiddlewareController.cs +* +* MiddlewareController.cs is part of VNLib.Plugins.Essentials which is part +* of the larger VNLib collection of libraries and utilities. +* +* VNLib.Plugins.Essentials is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Plugins.Essentials is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +using System.Threading.Tasks; +using System.Collections.Generic; + +namespace VNLib.Plugins.Essentials.Middleware +{ + internal sealed class MiddlewareController(EventProcessorConfig config) + { + private readonly IHttpMiddlewareChain _chain = config.MiddlewareChain; + + public async ValueTask ProcessAsync(HttpEntity entity) + { + /* + * Loops through the current linkedlist of the current middleware chain. The + * chain should remain unmodified after GetCurrentHead() is called. + * + * Middleware will return a Continue routine to move to the next middleware + * node. All other routines mean the processor has responded to the client + * itself and must exit control and move to response. + */ + + LinkedListNode? mwNode = _chain.GetCurrentHead(); + + //Loop through nodes + while (mwNode != null) + { + entity.EventArgs = await mwNode.ValueRef.ProcessAsync(entity); + + switch (entity.EventArgs.Routine) + { + //move next if continue is returned + case FpRoutine.Continue: + break; + + //Middleware completed the connection, time to exit the event processing + default: + return false; + } + + mwNode = mwNode.Next; + } + + return true; + } + + public void PostProcess(HttpEntity entity) + { + /* + * Middleware nodes may be allowed to inspect, or modify the return + * event arguments as the server may not have responded to the client + * yet. + */ + + LinkedListNode? mwNode = _chain.GetCurrentHead(); + + while (mwNode != null) + { + //Invoke mw handler on our event + mwNode.ValueRef.VolatilePostProcess(entity, ref entity.EventArgs); + + mwNode = mwNode.Next; + } + } + } +} diff --git a/lib/Plugins.Essentials/src/Oauth/OauthHttpExtensions.cs b/lib/Plugins.Essentials/src/Oauth/OauthHttpExtensions.cs index e65c26d..b60c7c3 100644 --- a/lib/Plugins.Essentials/src/Oauth/OauthHttpExtensions.cs +++ b/lib/Plugins.Essentials/src/Oauth/OauthHttpExtensions.cs @@ -90,40 +90,40 @@ namespace VNLib.Plugins.Essentials.Oauth ForwardOnlyWriter writer = new(buffer.Span); //Build the error message string - writer.Append("{\"error\":\""); + writer.AppendSmall("{\"error\":\""); switch (error) { case ErrorType.InvalidRequest: - writer.Append("invalid_request"); + writer.AppendSmall("invalid_request"); break; case ErrorType.InvalidClient: - writer.Append("invalid_client"); + writer.AppendSmall("invalid_client"); break; case ErrorType.UnauthorizedClient: - writer.Append("unauthorized_client"); + writer.AppendSmall("unauthorized_client"); break; case ErrorType.InvalidToken: - writer.Append("invalid_token"); + writer.AppendSmall("invalid_token"); break; case ErrorType.UnsupportedResponseType: - writer.Append("unsupported_response_type"); + writer.AppendSmall("unsupported_response_type"); break; case ErrorType.InvalidScope: - writer.Append("invalid_scope"); + writer.AppendSmall("invalid_scope"); break; case ErrorType.ServerError: - writer.Append("server_error"); + writer.AppendSmall("server_error"); break; case ErrorType.TemporarilyUnavailable: - writer.Append("temporarily_unavailable"); + writer.AppendSmall("temporarily_unavailable"); break; default: - writer.Append("error"); + writer.AppendSmall("error"); break; } - writer.Append("\",\"error_description\":\""); + writer.AppendSmall("\",\"error_description\":\""); writer.Append(description); - writer.Append("\"}"); + writer.AppendSmall("\"}"); //Close the response with the json data ev.CloseResponse(code, ContentType.Json, writer.AsSpan()); diff --git a/lib/Plugins.Essentials/src/SemiConsistentVeTable.cs b/lib/Plugins.Essentials/src/SemiConsistentVeTable.cs deleted file mode 100644 index e1706f4..0000000 --- a/lib/Plugins.Essentials/src/SemiConsistentVeTable.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Copyright (c) 2024 Vaughn Nugent -* -* Library: VNLib -* Package: VNLib.Plugins.Essentials -* File: SemiConsistentVeTable.cs -* -* SemiConsistentVeTable.cs is part of VNLib.Plugins.Essentials which -* is part of the larger VNLib collection of libraries and utilities. -* -* VNLib.Plugins.Essentials is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* VNLib.Plugins.Essentials is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see https://www.gnu.org/licenses/. -*/ - -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using System.Collections.Frozen; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -using VNLib.Net.Http; -using VNLib.Plugins.Essentials.Endpoints; - -namespace VNLib.Plugins.Essentials -{ - internal class SemiConsistentVeTable : IVirtualEndpointTable - { - - /* - * The VE table is read-only for the processor and my only - * be updated by the application via the methods below - * - * Since it would be very inefficient to track endpoint users - * using locks, we can assume any endpoint that is currently - * processing requests cannot be stopped, so we just focus on - * swapping the table when updates need to be made. - * - * This means calls to modify the table will read the table - * (clone it), modify the local copy, then exhange it for - * the active table so new requests will be processed on the - * new table. - * - * To make the calls to modify the table thread safe, a lock is - * held while modification operations run, then the updated - * copy is published. Any threads reading the old table - * will continue to use a stale endpoint. - */ - - /// - /// A "lookup table" that represents virtual endpoints to be processed when an - /// incomming connection matches its path parameter - /// - private FrozenDictionary> VirtualEndpoints = - new Dictionary>(StringComparer.OrdinalIgnoreCase) - .ToFrozenDictionary(); - - private bool _isEmpty = true; - - /* - * A lock that is held by callers that intend to - * modify the vep table at the same time - */ - private readonly object VeUpdateLock = new(); - - /// - public bool IsEmpty => _isEmpty; - - - /// - public void AddEndpoint(params IEndpoint[] endpoints) - { - //Check - ArgumentNullException.ThrowIfNull(endpoints); - //Make sure all endpoints specify a path - if (endpoints.Any(static e => string.IsNullOrWhiteSpace(e?.Path))) - { - throw new ArgumentException("Endpoints array contains one or more empty endpoints"); - } - - if (endpoints.Length == 0) - { - return; - } - - //Get virtual endpoints - IEnumerable> eps = endpoints - .Where(static e => e is IVirtualEndpoint) - .Select(static e => (IVirtualEndpoint)e); - - //Get http event endpoints and create wrapper classes for conversion - IEnumerable> evs = endpoints - .Where(static e => e is IVirtualEndpoint) - .Select(static e => new EvEndpointWrapper((e as IVirtualEndpoint)!)); - - //Uinion endpoints by their paths to combine them - IEnumerable> allEndpoints = eps.UnionBy(evs, static s => s.Path); - - //Only allow 1 thread at a time to mutate the table - lock (VeUpdateLock) - { - //Clone the current dictonary - Dictionary> newTable = new(VirtualEndpoints, StringComparer.OrdinalIgnoreCase); - //Insert the new eps, and/or overwrite old eps - foreach (IVirtualEndpoint ep in allEndpoints) - { - newTable.Add(ep.Path, ep); - } - - //Update is-empty flag - _isEmpty = newTable.Count == 0; - - //Create the new table and store the entire table - _ = Interlocked.Exchange(ref VirtualEndpoints, newTable.ToFrozenDictionary(StringComparer.OrdinalIgnoreCase)); - } - } - - /// - public void RemoveEndpoint(params IEndpoint[] eps) - { - ArgumentNullException.ThrowIfNull(eps); - //Call remove on path - RemoveEndpoint(eps.Select(static s => s.Path).ToArray()); - } - - /// - public void RemoveEndpoint(params string[] paths) - { - ArgumentNullException.ThrowIfNull(paths); - - //Make sure all endpoints specify a path - if (paths.Any(static e => string.IsNullOrWhiteSpace(e))) - { - throw new ArgumentException("Paths array contains one or more empty strings"); - } - - if (paths.Length == 0) - { - return; - } - - //take update lock - lock (VeUpdateLock) - { - //Clone the current dictonary - Dictionary> newTable = new(VirtualEndpoints, StringComparer.OrdinalIgnoreCase); - - foreach (string eps in paths) - { - _ = newTable.Remove(eps); - } - - //Update is-empty flag - _isEmpty = newTable.Count == 0; - - //Store the new table - _ = Interlocked.Exchange(ref VirtualEndpoints, newTable.ToFrozenDictionary(StringComparer.OrdinalIgnoreCase)); - } - } - - /// - public bool TryGetEndpoint(string path, [NotNullWhen(true)] out IVirtualEndpoint? endpoint) - => VirtualEndpoints.TryGetValue(path, out endpoint); - - - /* - * Wrapper class for converting IHttpEvent endpoints to - * httpEntityEndpoints - */ - private sealed class EvEndpointWrapper(IVirtualEndpoint Wrapped) : IVirtualEndpoint - { - string IEndpoint.Path => Wrapped.Path; - - ValueTask IVirtualEndpoint.Process(HttpEntity entity) => Wrapped.Process(entity); - } - } -} \ No newline at end of file diff --git a/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj b/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj index 4da640a..3a21ac9 100644 --- a/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj +++ b/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj @@ -2,13 +2,15 @@ net8.0 + enable VNLib.Plugins.Essentials VNLib.Plugins.Essentials - latest-all - True True false - enable + + + + latest-all diff --git a/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj b/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj index 7be9124..57701b8 100644 --- a/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj +++ b/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj @@ -2,12 +2,16 @@ net8.0 + enable VNLib.Plugins VNLib.Plugins.PluginBase - latest-all false True + + + latest-all + Vaughn Nugent diff --git a/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj b/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj index f95a95f..002716f 100644 --- a/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj +++ b/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj @@ -1,15 +1,18 @@ - enable net8.0 + enable VNLib.Plugins.Runtime VNLib.Plugins.Runtime - latest-all false True + + latest-all + + Vaughn Nugent Vaughn Nugent diff --git a/lib/Plugins/src/VNLib.Plugins.csproj b/lib/Plugins/src/VNLib.Plugins.csproj index 21fb203..343d86f 100644 --- a/lib/Plugins/src/VNLib.Plugins.csproj +++ b/lib/Plugins/src/VNLib.Plugins.csproj @@ -2,14 +2,17 @@ net8.0 + enable VNLib.Plugins VNLib.Plugins - enable True - latest-all false + + latest-all + + Vaughn Nugent Vaughn Nugent diff --git a/lib/Utils.Memory/vnlib_mimalloc/CMakeLists.txt b/lib/Utils.Memory/vnlib_mimalloc/CMakeLists.txt index 4a2a946..f2324a0 100644 --- a/lib/Utils.Memory/vnlib_mimalloc/CMakeLists.txt +++ b/lib/Utils.Memory/vnlib_mimalloc/CMakeLists.txt @@ -1,18 +1,17 @@ cmake_minimum_required(VERSION 3.10) project(vnlib_mimalloc C) -set(CMAKE_PROJECT_NAME "vnlib_mimalloc") +set(_MI_PROJ_NAME "vnlib_mimalloc") option(ENABLE_GREEDY "Enable greedy allocator configuration" ON) set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The build configuration type") +string(TOLOWER ${CMAKE_BUILD_TYPE} build_type) +message(STATUS "Build type is '${build_type}'") + #Setup the compiler options set(CMAKE_C_STANDARD 11) #c11 is required for mimalloc static assertions set(CMAKE_C_STANDARD_REQUIRED ON) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) #enable position independent code (for shared libraries with exports) - -string(TOLOWER ${CMAKE_BUILD_TYPE} build_type) -message(STATUS "Build type is '${build_type}'") #export header files to the main project file(GLOB HEADERS *.h) @@ -21,25 +20,31 @@ file(GLOB HEADERS *.h) file(GLOB VNLIB_MIMALLOC_SOURCES *.c) #create my shared library -add_library(${CMAKE_PROJECT_NAME} SHARED ${VNLIB_MIMALLOC_SOURCES} ${HEADERS}) -add_library(${CMAKE_PROJECT_NAME}_static STATIC ${VNLIB_MIMALLOC_SOURCES} ${HEADERS}) +add_library(${_MI_PROJ_NAME} SHARED ${VNLIB_MIMALLOC_SOURCES} ${HEADERS}) +add_library(${_MI_PROJ_NAME}_static STATIC ${VNLIB_MIMALLOC_SOURCES} ${HEADERS}) +#enable fPIC for shared library +set_target_properties(${_MI_PROJ_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) #if on unix lib will be appended, so we can adjust if(UNIX) - set_target_properties(${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_NAME}_static PROPERTIES OUTPUT_NAME vn_mimalloc) + set_target_properties( + ${_MI_PROJ_NAME} + ${_MI_PROJ_NAME}_static + + PROPERTIES + OUTPUT_NAME + vn_mimalloc + ) endif() +set(_MI_COMP_ARGS) +set(_MI_COMP_DEFS) + #setup flags for windows compilation if(MSVC) - #if debug - target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE $<$:DEBUG>) - #only target our project - target_compile_options( - ${CMAKE_PROJECT_NAME} - PRIVATE - + list(APPEND _MI_COMP_ARGS /Qspectre /sdl /TC @@ -62,10 +67,7 @@ if(MSVC) ) #set build macros - target_compile_definitions( - ${CMAKE_PROJECT_NAME} - PRIVATE - + list(APPEND _MI_COMP_DEFS $<$:DEBUG> $<$:RELEASE> ) @@ -73,20 +75,14 @@ if(MSVC) #configure gcc flags elseif(CMAKE_COMPILER_IS_GNUCC) - target_compile_options( - ${CMAKE_PROJECT_NAME} - PRIVATE - + list(APPEND _MI_COMP_ARGS -Wextra -fstack-protector ) #enable debug compiler options if(build_type STREQUAL "debug") - target_compile_options( - ${CMAKE_PROJECT_NAME} - PRIVATE - + list(APPEND _MI_COMP_ARGS -g #enable debugger info -Og #disable optimizations -Wall #enable all warnings @@ -94,7 +90,9 @@ elseif(CMAKE_COMPILER_IS_GNUCC) -pedantic #enable pedantic mode ) - target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE DEBUG) + list(APPEND _MI_COMP_DEFS + DEBUG + ) endif() @@ -102,6 +100,13 @@ else() message(FATAL_ERROR "Unsupported compiler, sorry. Submit an issue for your platform and I'll work on it :)") endif() +#add the definitions to the project +target_compile_definitions(${_MI_PROJ_NAME} PRIVATE ${_MI_COMP_DEFS}) +target_compile_definitions(${_MI_PROJ_NAME}_static PRIVATE ${_MI_COMP_DEFS}) + +#add the compiler flags to the project +target_compile_options(${_MI_PROJ_NAME} PRIVATE ${_MI_COMP_ARGS}) +target_compile_options(${_MI_PROJ_NAME}_static PRIVATE ${_MI_COMP_ARGS}) #include mimalloc headers include_directories(vendor/include) @@ -115,6 +120,9 @@ include_directories(vendor/include) set(MI_BUILD_TESTS OFF) set(MI_BUILD_STATIC ON) set(MI_BUILD_SHARED OFF) +set(MI_BUILD_OBJECT OFF) +set(MI_BUILD_TESTS OFF) +set(MI_XMALLOC OFF) #Do not allow process abort when alloc fails, we don't need it set(MI_OVERRIDE OFF) set(MI_WIN_REDIRECT OFF) @@ -123,5 +131,6 @@ add_subdirectory( ${CMAKE_CURRENT_BINARY_DIR}/mimalloc ) -target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE mimalloc-static) -target_link_libraries(${CMAKE_PROJECT_NAME}_static PRIVATE mimalloc-static) +target_link_libraries(${_MI_PROJ_NAME} PRIVATE mimalloc-static) +target_link_libraries(${_MI_PROJ_NAME}_static PRIVATE mimalloc-static) + diff --git a/lib/Utils.Memory/vnlib_mimalloc/Taskfile.yaml b/lib/Utils.Memory/vnlib_mimalloc/Taskfile.yaml index acf8851..2d816e3 100644 --- a/lib/Utils.Memory/vnlib_mimalloc/Taskfile.yaml +++ b/lib/Utils.Memory/vnlib_mimalloc/Taskfile.yaml @@ -18,7 +18,7 @@ tasks: desc: "Builds the entire project from source code without using the VNBuild build system for target machines" cmds: #init cmake build with greedy enabled - - cmake -Bbuild/ -DCMAKE_BUILD_TYPE=Release -DENABLE_GREEDY=1 {{.CMAKE_ARGS}} + - cmake -Bbuild/ -DCMAKE_BUILD_TYPE=Release -DENABLE_GREEDY=1 {{.CLI_ARGS}} - cmake --build build/ --config Release - cmd: echo "Your vnlib_mimalloc library file can be found in '{{.USER_WORKING_DIR}}/build'" silent: true @@ -26,7 +26,7 @@ tasks: build: cmds: #build our library - - cmake -B./build -DENABLE_GREEDY=1 {{.CMAKE_ARGS}} + - cmake -B./build -DENABLE_GREEDY=1 {{.CLI_ARGS}} - cmake --build build/ --config Debug - cmake --build build/ --config Release @@ -72,7 +72,7 @@ tasks: dir: '{{.USER_WORKING_DIR}}' cmds: #pack mimalloc source code and create the archive - - powershell -Command "tar --exclude build/* --exclude bin/* --exclude vendor/docs/ --exclude vendor/doc/ --exclude vendor/test/ --exclude vendor/ide/ --exclude vendor/out/ -czf 'bin/src.tgz' ." + - powershell -Command "tar --exclude build/* --exclude bin/* --exclude vendor/test/ --exclude vendor/out/ -czf 'bin/src.tgz' ." clean: ignore_error: true diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/.gitattributes b/lib/Utils.Memory/vnlib_mimalloc/vendor/.gitattributes index 0332e03..f083b10 100644 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/.gitattributes +++ b/lib/Utils.Memory/vnlib_mimalloc/vendor/.gitattributes @@ -10,3 +10,4 @@ *.dll binary *.lib binary *.exe binary +bin export-ignore diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/CMakeLists.txt b/lib/Utils.Memory/vnlib_mimalloc/vendor/CMakeLists.txt index 2bcd1ef..2cc2fc4 100644 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/CMakeLists.txt +++ b/lib/Utils.Memory/vnlib_mimalloc/vendor/CMakeLists.txt @@ -19,6 +19,7 @@ option(MI_OSX_INTERPOSE "Use interpose to override standard malloc on macOS" option(MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" ON) option(MI_WIN_REDIRECT "Use redirection module ('mimalloc-redirect') on Windows if compiling mimalloc as a DLL" ON) option(MI_LOCAL_DYNAMIC_TLS "Use slightly slower, dlopen-compatible TLS mechanism (Unix)" OFF) +option(MI_LIBC_MUSL "Set this when linking with musl libc" OFF) option(MI_BUILD_SHARED "Build shared library" ON) option(MI_BUILD_STATIC "Build static library" ON) option(MI_BUILD_OBJECT "Build object library" ON) @@ -27,10 +28,11 @@ option(MI_DEBUG_TSAN "Build with thread sanitizer (needs clang)" OFF) option(MI_DEBUG_UBSAN "Build with undefined-behavior sanitizer (needs clang++)" OFF) option(MI_SKIP_COLLECT_ON_EXIT "Skip collecting memory on program exit" OFF) option(MI_NO_PADDING "Force no use of padding even in DEBUG mode etc." OFF) +option(MI_INSTALL_TOPLEVEL "Install directly into $CMAKE_INSTALL_PREFIX instead of PREFIX/lib/mimalloc-version" OFF) +option(MI_NO_THP "Disable transparent huge pages support on Linux/Android for the mimalloc process only" OFF) # deprecated options option(MI_CHECK_FULL "Use full internal invariant checking in DEBUG mode (deprecated, use MI_DEBUG_FULL instead)" OFF) -option(MI_INSTALL_TOPLEVEL "Install directly into $CMAKE_INSTALL_PREFIX instead of PREFIX/lib/mimalloc-version (deprecated)" OFF) option(MI_USE_LIBATOMIC "Explicitly link with -latomic (on older systems) (deprecated and detected automatically)" OFF) include(CheckIncludeFiles) @@ -45,6 +47,7 @@ set(mi_sources src/bitmap.c src/heap.c src/init.c + src/libc.c src/options.c src/os.c src/page.c @@ -55,6 +58,9 @@ set(mi_sources src/prim/prim.c) set(mi_cflags "") +set(mi_cflags_static "") # extra flags for a static library build +set(mi_cflags_dynamic "") # extra flags for a shared-object library build +set(mi_defines "") set(mi_libraries "") # ----------------------------------------------------------------------------- @@ -82,6 +88,17 @@ endif() # Process options # ----------------------------------------------------------------------------- +# put -Wall early so other warnings can be disabled selectively +if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang") + list(APPEND mi_cflags -Wall -Wextra -Wpedantic) +endif() +if(CMAKE_C_COMPILER_ID MATCHES "GNU") + list(APPEND mi_cflags -Wall -Wextra) +endif() +if(CMAKE_C_COMPILER_ID MATCHES "Intel") + list(APPEND mi_cflags -Wall) +endif() + if(CMAKE_C_COMPILER_ID MATCHES "MSVC|Intel") set(MI_USE_CXX "ON") endif() @@ -127,7 +144,7 @@ endif() if(MI_SECURE) message(STATUS "Set full secure build (MI_SECURE=ON)") - list(APPEND mi_defines MI_SECURE=4) + list(APPEND mi_defines MI_SECURE=4) endif() if(MI_TRACK_VALGRIND) @@ -184,6 +201,10 @@ endif() if(MI_SEE_ASM) message(STATUS "Generate assembly listings (MI_SEE_ASM=ON)") list(APPEND mi_cflags -save-temps) + if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang") + message(STATUS "No GNU Line marker") + list(APPEND mi_cflags -Wno-gnu-line-marker) + endif() endif() if(MI_CHECK_FULL) @@ -246,7 +267,7 @@ if(MI_DEBUG_UBSAN) message(WARNING "Can only use undefined-behavior sanitizer with clang++ (MI_DEBUG_UBSAN=ON but ignored)") endif() else() - message(WARNING "Can only use thread sanitizer with a debug build (CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})") + message(WARNING "Can only use undefined-behavior sanitizer with a debug build (CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})") endif() endif() @@ -262,31 +283,51 @@ if(MI_USE_CXX) endif() endif() -if(CMAKE_SYSTEM_NAME MATCHES "Haiku") - SET(CMAKE_INSTALL_LIBDIR ~/config/non-packaged/lib) - SET(CMAKE_INSTALL_INCLUDEDIR ~/config/non-packaged/headers) - endif() +if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android") + if(MI_NO_THP) + message(STATUS "Disable transparent huge pages support (MI_NO_THP=ON)") + list(APPEND mi_defines MI_NO_THP=1) + endif() +endif() + +if(MI_LIBC_MUSL) + message(STATUS "Assume using musl libc (MI_LIBC_MUSL=ON)") + list(APPEND mi_defines MI_LIBC_MUSL=1) +endif() + +# On Haiku use `-DCMAKE_INSTALL_PREFIX` instead, issue #788 +# if(CMAKE_SYSTEM_NAME MATCHES "Haiku") +# SET(CMAKE_INSTALL_LIBDIR ~/config/non-packaged/lib) +# SET(CMAKE_INSTALL_INCLUDEDIR ~/config/non-packaged/headers) +# endif() # Compiler flags if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU") - list(APPEND mi_cflags -Wall -Wextra -Wno-unknown-pragmas -fvisibility=hidden) + list(APPEND mi_cflags -Wno-unknown-pragmas -fvisibility=hidden) if(NOT MI_USE_CXX) list(APPEND mi_cflags -Wstrict-prototypes) endif() if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang") - list(APPEND mi_cflags -Wpedantic -Wno-static-in-inline) + list(APPEND mi_cflags -Wno-static-in-inline) endif() endif() if(CMAKE_C_COMPILER_ID MATCHES "Intel") - list(APPEND mi_cflags -Wall -fvisibility=hidden) + list(APPEND mi_cflags -fvisibility=hidden) endif() if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU|Intel" AND NOT CMAKE_SYSTEM_NAME MATCHES "Haiku") if(MI_LOCAL_DYNAMIC_TLS) list(APPEND mi_cflags -ftls-model=local-dynamic) else() - list(APPEND mi_cflags -ftls-model=initial-exec) + if(MI_LIBC_MUSL) + # with musl we use local-dynamic for the static build, see issue #644 + list(APPEND mi_cflags_static -ftls-model=local-dynamic) + list(APPEND mi_cflags_dynamic -ftls-model=initial-exec) + message(STATUS "Use local dynamic TLS for the static build (since MI_LIBC_MUSL=ON)") + else() + list(APPEND mi_cflags -ftls-model=initial-exec) + endif() endif() if(MI_OVERRIDE) list(APPEND mi_cflags -fno-builtin-malloc) @@ -394,7 +435,7 @@ if(MI_BUILD_SHARED) add_library(mimalloc SHARED ${mi_sources}) set_target_properties(mimalloc PROPERTIES VERSION ${mi_version} SOVERSION ${mi_version_major} OUTPUT_NAME ${mi_basename} ) target_compile_definitions(mimalloc PRIVATE ${mi_defines} MI_SHARED_LIB MI_SHARED_LIB_EXPORT) - target_compile_options(mimalloc PRIVATE ${mi_cflags}) + target_compile_options(mimalloc PRIVATE ${mi_cflags} ${mi_cflags_dynamic}) target_link_libraries(mimalloc PRIVATE ${mi_libraries}) target_include_directories(mimalloc PUBLIC $ @@ -424,7 +465,7 @@ if (MI_BUILD_STATIC) add_library(mimalloc-static STATIC ${mi_sources}) set_property(TARGET mimalloc-static PROPERTY POSITION_INDEPENDENT_CODE ON) target_compile_definitions(mimalloc-static PRIVATE ${mi_defines} MI_STATIC_LIB) - target_compile_options(mimalloc-static PRIVATE ${mi_cflags}) + target_compile_options(mimalloc-static PRIVATE ${mi_cflags} ${mi_cflags_static}) target_link_libraries(mimalloc-static PRIVATE ${mi_libraries}) target_include_directories(mimalloc-static PUBLIC $ @@ -456,7 +497,7 @@ if (MI_BUILD_OBJECT) add_library(mimalloc-obj OBJECT src/static.c) 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_compile_options(mimalloc-obj PRIVATE ${mi_cflags} ${mi_cflags_static}) target_include_directories(mimalloc-obj PUBLIC $ $ @@ -467,7 +508,7 @@ if (MI_BUILD_OBJECT) set(mimalloc-obj-static "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION}") set(mimalloc-obj-out "${CMAKE_CURRENT_BINARY_DIR}/${mi_basename}${CMAKE_C_OUTPUT_EXTENSION}") add_custom_command(OUTPUT ${mimalloc-obj-out} DEPENDS mimalloc-obj COMMAND "${CMAKE_COMMAND}" -E copy "${mimalloc-obj-static}" "${mimalloc-obj-out}") - add_custom_target(mimalloc-obj-target ALL DEPENDS ${mimalloc-obj-out}) + add_custom_target(mimalloc-obj-target ALL DEPENDS ${mimalloc-obj-out}) endif() # the following seems to lead to cmake warnings/errors on some systems, disable for now :-( diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/SECURITY.md b/lib/Utils.Memory/vnlib_mimalloc/vendor/SECURITY.md index e138ec5..b3c89ef 100644 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/SECURITY.md +++ b/lib/Utils.Memory/vnlib_mimalloc/vendor/SECURITY.md @@ -1,20 +1,20 @@ - + ## Security -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin). -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below. ## Reporting Security Issues **Please do not report security vulnerabilities through public GitHub issues.** -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report). -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp). -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: @@ -28,7 +28,7 @@ Please include the requested information listed below (as much as you can provid This information will help us triage your report more quickly. -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs. ## Preferred Languages @@ -36,6 +36,6 @@ We prefer all communications to be in English. ## Policy -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd). diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/cmake/mimalloc-config-version.cmake b/lib/Utils.Memory/vnlib_mimalloc/vendor/cmake/mimalloc-config-version.cmake index a44c121..9b19b56 100644 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/cmake/mimalloc-config-version.cmake +++ b/lib/Utils.Memory/vnlib_mimalloc/vendor/cmake/mimalloc-config-version.cmake @@ -1,6 +1,6 @@ set(mi_version_major 2) set(mi_version_minor 1) -set(mi_version_patch 2) +set(mi_version_patch 6) set(mi_version ${mi_version_major}.${mi_version_minor}) set(PACKAGE_VERSION ${mi_version}) diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg deleted file mode 100644 index 9005097..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-a.svg +++ /dev/null @@ -1,887 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg deleted file mode 100644 index 2d853ed..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-b.svg +++ /dev/null @@ -1,1185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg deleted file mode 100644 index 393bfad..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-a.svg +++ /dev/null @@ -1,757 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg deleted file mode 100644 index 419dc25..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-c5-18xlarge-2020-01-20-rss-b.svg +++ /dev/null @@ -1,1028 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-1.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-1.svg deleted file mode 100644 index c296a04..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-1.svg +++ /dev/null @@ -1,769 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg deleted file mode 100644 index b8a2f20..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-a.svg +++ /dev/null @@ -1,868 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg deleted file mode 100644 index 4a7e21e..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-12xlarge-2020-01-16-b.svg +++ /dev/null @@ -1,1157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-2.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-2.svg deleted file mode 100644 index 917ea57..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-2.svg +++ /dev/null @@ -1,983 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-rss-1.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-rss-1.svg deleted file mode 100644 index 375ebd2..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-rss-1.svg +++ /dev/null @@ -1,683 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-rss-2.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-rss-2.svg deleted file mode 100644 index cb2bbc8..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-r5a-rss-2.svg +++ /dev/null @@ -1,854 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-spec-rss.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-spec-rss.svg deleted file mode 100644 index 2c93616..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-spec-rss.svg +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-spec.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-spec.svg deleted file mode 100644 index af2b41b..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-spec.svg +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-1.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-1.svg deleted file mode 100644 index dacd8ab..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-1.svg +++ /dev/null @@ -1,890 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-2.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-2.svg deleted file mode 100644 index 9990cdc..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-2.svg +++ /dev/null @@ -1,1146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-rss-1.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-rss-1.svg deleted file mode 100644 index 891f7d6..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-rss-1.svg +++ /dev/null @@ -1,796 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-rss-2.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-rss-2.svg deleted file mode 100644 index f426537..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2020/bench-z4-rss-2.svg +++ /dev/null @@ -1,974 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-amd5950x-2021-01-30-a.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-amd5950x-2021-01-30-a.svg deleted file mode 100644 index 86a97bf..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-amd5950x-2021-01-30-a.svg +++ /dev/null @@ -1,952 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-amd5950x-2021-01-30-b.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-amd5950x-2021-01-30-b.svg deleted file mode 100644 index c748877..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-amd5950x-2021-01-30-b.svg +++ /dev/null @@ -1,1255 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg deleted file mode 100644 index bc91c21..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-a.svg +++ /dev/null @@ -1,955 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg deleted file mode 100644 index e8b04a0..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-b.svg +++ /dev/null @@ -1,1269 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg deleted file mode 100644 index 6cd36aa..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-a.svg +++ /dev/null @@ -1,836 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg deleted file mode 100644 index c81072e..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-c5-18xlarge-2021-01-30-rss-b.svg +++ /dev/null @@ -1,1131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-macmini-2021-01-30.svg b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-macmini-2021-01-30.svg deleted file mode 100644 index ece6418..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/bench-2021/bench-macmini-2021-01-30.svg +++ /dev/null @@ -1,766 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/doxyfile b/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/doxyfile deleted file mode 100644 index 55cae8b..0000000 --- a/lib/Utils.Memory/vnlib_mimalloc/vendor/doc/doxyfile +++ /dev/null @@ -1,2659 +0,0 @@ -# Doxyfile 1.9.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the configuration -# file that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = mi-malloc - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = 1.8/2.1 - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = mimalloc-logo.svg - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = .. - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all generated output in the proper direction. -# Possible values are: None, LTR, RTL and Context. -# The default value is: None. - -OUTPUT_TEXT_DIRECTION = None - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = YES - -# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line -# such as -# /*************** -# as being the beginning of a Javadoc-style comment "banner". If set to NO, the -# Javadoc-style will behave just like regular comments and it will not be -# interpreted by doxygen. -# The default value is: NO. - -JAVADOC_BANNER = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# By default Python docstrings are displayed as preformatted text and doxygen's -# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the -# doxygen's special commands can be used and the contents of the docstring -# documentation blocks is shown as doxygen documentation. -# The default value is: YES. - -PYTHON_DOCSTRING = YES - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 2 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. -# When you need a literal { or } or , in the value part of an alias you have to -# escape them by means of a backslash (\), this can lead to conflicts with the -# commands \{ and \} for these it is advised to use the version @{ and @} or use -# a double escape (\\{ and \\}) - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice -# sources only. Doxygen will then generate output that is more tailored for that -# language. For instance, namespaces will be presented as modules, types will be -# separated into more groups, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_SLICE = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, -# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: -# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser -# tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files). For instance to make doxygen treat .inc files -# as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. When specifying no_extension you should add -# * to the FILE_PATTERNS. -# -# Note see also the list of default file extension mappings. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 5. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 0 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = YES - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = YES - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use -# during processing. When set to 0 doxygen will based this on the number of -# cores available in the system. You can set it explicitly to a value larger -# than 0 to get more control over the balance between CPU load and processing -# speed. At this moment only the input processing can be done using multiple -# threads. Since this is still an experimental feature the default is set to 1, -# which efficively disables parallel processing. Please report any issues you -# encounter. Generating dot graphs in parallel is controlled by the -# DOT_NUM_THREADS setting. -# Minimum value: 0, maximum value: 32, default value: 1. - -NUM_PROC_THREADS = 1 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual -# methods of a class will be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIV_VIRTUAL = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If this flag is set to YES, the name of an unnamed parameter in a declaration -# will be determined by the corresponding definition. By default unnamed -# parameters remain unnamed in the output. -# The default value is: YES. - -RESOLVE_UNNAMED_PARAMS = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# declarations. If set to NO, these declarations will be included in the -# documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# With the correct setting of option CASE_SENSE_NAMES doxygen will better be -# able to match the capabilities of the underlying filesystem. In case the -# filesystem is case sensitive (i.e. it supports files in the same directory -# whose names only differ in casing), the option must be set to YES to properly -# deal with such files in case they appear in the input. For filesystems that -# are not case sensitive the option should be be set to NO to properly deal with -# output files written for symbols that only differ in casing, such as for two -# classes, one named CLASS and the other named Class, and to also support -# references to files without having to specify the exact matching casing. On -# Windows (including Cygwin) and MacOS, users should typically set this option -# to NO, whereas on Linux or other Unix flavors it should typically be set to -# YES. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 0 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = NO - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. If -# EXTRACT_ALL is set to YES then this flag will automatically be disabled. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS -# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but -# at the end of the doxygen process doxygen will return with a non-zero status. -# Possible values are: NO, YES and FAIL_ON_WARNINGS. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = mimalloc-doc.h - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: -# https://www.gnu.org/software/libiconv/) for the list of possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# Note the list of default checked file patterns might differ from the list of -# default file extension mappings. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), -# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, -# *.ucf, *.qsf and *.ice. - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.idl \ - *.ddl \ - *.odl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.cs \ - *.d \ - *.php \ - *.php4 \ - *.php5 \ - *.phtml \ - *.inc \ - *.m \ - *.markdown \ - *.md \ - *.mm \ - *.dox \ - *.py \ - *.pyw \ - *.f90 \ - *.f95 \ - *.f03 \ - *.f08 \ - *.f \ - *.for \ - *.tcl \ - *.vhd \ - *.vhdl \ - *.ucf \ - *.qsf - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# entity all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: -# http://clang.llvm.org/) for more accurate parsing at the cost of reduced -# performance. This can be particularly helpful with template rich C++ code for -# which doxygen's built-in parser lacks the necessary type information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to -# YES then doxygen will add the directory of each input to the include path. -# The default value is: YES. - -CLANG_ADD_INC_PATHS = YES - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -# If clang assisted parsing is enabled you can provide the clang parser with the -# path to the directory containing a file called compile_commands.json. This -# file is the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the -# options used when the source files were built. This is equivalent to -# specifying the -p option to a clang tool, such as clang-check. These options -# will then be passed to the parser. Any options specified with CLANG_OPTIONS -# will be added as well. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. - -CLANG_DATABASE_PATH = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = docs - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = mimalloc-doxygen.css - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 189 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 12 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 240 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via JavaScript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have JavaScript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = NO - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: -# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To -# create a documentation set, doxygen will generate a Makefile in the HTML -# output directory. Running make will produce the docset in that directory and -# running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy -# genXcode/_index.html for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: -# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the main .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location (absolute path -# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to -# run qhelpgenerator on the generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = YES - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = YES - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 180 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg -# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see -# https://inkscape.org) to generate formulas as SVG images instead of PNGs for -# the HTML output. These images will generally look nicer at scaled resolutions. -# Possible values are: png (the default) and svg (looks nicer but requires the -# pdf2svg or inkscape tool). -# The default value is: png. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FORMULA_FORMAT = png - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands -# to create new LaTeX commands to be used in formulas as building blocks. See -# the section "Including formulas" for details. - -FORMULA_MACROFILE = - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , / + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Reset() => Written = 0; } } diff --git a/lib/Utils/src/Memory/IUnmangedHeap.cs b/lib/Utils/src/Memory/IUnmangedHeap.cs index fdc0f9b..e6f82e0 100644 --- a/lib/Utils/src/Memory/IUnmangedHeap.cs +++ b/lib/Utils/src/Memory/IUnmangedHeap.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: VNLib.Utils @@ -42,7 +42,10 @@ namespace VNLib.Utils.Memory /// The size (in bytes) of the element /// The number of elements to allocate /// An optional parameter to zero the block of memory - /// + /// A memory address to a valid block on the heap + /// + /// If the heap is unable to allocate the requested memory, an OutOfMemoryException will be thrown + /// /// IntPtr Alloc(nuint elements, nuint size, bool zero); diff --git a/lib/Utils/src/Memory/MemoryUtil.CopyUtilCore.cs b/lib/Utils/src/Memory/MemoryUtil.CopyUtilCore.cs index f196597..9decef7 100644 --- a/lib/Utils/src/Memory/MemoryUtil.CopyUtilCore.cs +++ b/lib/Utils/src/Memory/MemoryUtil.CopyUtilCore.cs @@ -126,7 +126,7 @@ namespace VNLib.Utils.Memory Debug.Assert(!Unsafe.IsNullRef(in srcByte), "Null source reference passed to MemmoveByRef"); Debug.Assert(!Unsafe.IsNullRef(in dstByte), "Null destination reference passed to MemmoveByRef"); - //Check for 64bit copy + //Check for 64bit copy (should get optimized away when sizeof(nuint == uint) aka 32bit platforms) if(byteCount > uint.MaxValue) { //We need a 64bit copy strategy @@ -135,7 +135,6 @@ namespace VNLib.Utils.Memory //Must be supported if(_avxCopy.Features != CopyFeatures.NotSupported) { - //Copy _avxCopy.Memmove(in srcByte, ref dstByte, byteCount); return; } @@ -144,7 +143,6 @@ namespace VNLib.Utils.Memory //try reflected memove incase it supports 64bit blocks if(_reflectedMemmove.Features != CopyFeatures.NotSupported) { - //Copy _reflectedMemmove.Memmove(in srcByte, ref dstByte, byteCount); return; } @@ -223,6 +221,7 @@ namespace VNLib.Utils.Memory public CopyFeatures Features => CopyFeatures.None; /// + [MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)] public void Memmove(ref readonly byte src, ref byte dst, nuint byteCount) { Debug.Assert(byteCount < uint.MaxValue, "Byte count must be less than uint.MaxValue and flags assumed 64bit blocks were supported"); diff --git a/lib/Utils/src/Memory/NativeHeap.cs b/lib/Utils/src/Memory/NativeHeap.cs index 6381dd9..fb9612c 100644 --- a/lib/Utils/src/Memory/NativeHeap.cs +++ b/lib/Utils/src/Memory/NativeHeap.cs @@ -106,7 +106,7 @@ namespace VNLib.Utils.Memory private HeapMethods MethodTable; - private unsafe NativeHeap(UnmanagedHeapDescriptor* flags, HeapMethods methodTable) :base(flags->CreationFlags, true) + private unsafe NativeHeap(UnmanagedHeapDescriptor* flags, HeapMethods methodTable) : base(flags->CreationFlags, true) { //Store heap pointer SetHandle(flags->HeapPointer); @@ -164,7 +164,7 @@ namespace VNLib.Utils.Memory delegate ERRNO DestroyHeapDelegate(IntPtr heap); [StructLayout(LayoutKind.Sequential)] - record struct UnmanagedHeapDescriptor + struct UnmanagedHeapDescriptor { public IntPtr HeapPointer; diff --git a/lib/Utils/src/Memory/UnmanagedHeapBase.cs b/lib/Utils/src/Memory/UnmanagedHeapBase.cs index 599d8d9..7f42761 100644 --- a/lib/Utils/src/Memory/UnmanagedHeapBase.cs +++ b/lib/Utils/src/Memory/UnmanagedHeapBase.cs @@ -67,7 +67,7 @@ namespace VNLib.Utils.Memory DangerousAddRef(ref handleCountIncremented); //Failed to increment ref count, class has been disposed - ObjectDisposedException.ThrowIf(handleCountIncremented == false, "The handle has been released"); + ObjectDisposedException.ThrowIf(handleCountIncremented == false, this); try { diff --git a/lib/Utils/src/VNLib.Utils.csproj b/lib/Utils/src/VNLib.Utils.csproj index 7941a7b..83d245c 100644 --- a/lib/Utils/src/VNLib.Utils.csproj +++ b/lib/Utils/src/VNLib.Utils.csproj @@ -2,15 +2,18 @@ net8.0 + enable VNLib.Utils VNLib.Utils true - enable True - latest-all false + + latest-all + + VNLib.Utils Vaughn Nugent diff --git a/vnlib.core.build.sln b/vnlib.core.build.sln index 74d26ca..3463ebd 100644 --- a/vnlib.core.build.sln +++ b/vnlib.core.build.sln @@ -40,6 +40,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compression", "Compression" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VNLib.Net.Compression", "lib\Net.Compression\VNLib.Net.Compression\VNLib.Net.Compression.csproj", "{4F7DCA8A-8B67-4277-8F14-FA43E479CB9B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VNLib.Net.CompressionTests", "lib\Net.Compression\VNLib.Net.CompressionTests\VNLib.Net.CompressionTests.csproj", "{E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{C8AB039C-E368-4C51-920D-06F2CEB2C95A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VNLib.UtilsTests", "lib\Utils\tests\VNLib.UtilsTests.csproj", "{45EBB278-46D3-40D3-B358-0EBDC622F377}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -194,12 +200,39 @@ Global {4F7DCA8A-8B67-4277-8F14-FA43E479CB9B}.Release|x64.Build.0 = Release|Any CPU {4F7DCA8A-8B67-4277-8F14-FA43E479CB9B}.Release|x86.ActiveCfg = Release|Any CPU {4F7DCA8A-8B67-4277-8F14-FA43E479CB9B}.Release|x86.Build.0 = Release|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Debug|x64.ActiveCfg = Debug|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Debug|x64.Build.0 = Debug|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Debug|x86.ActiveCfg = Debug|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Debug|x86.Build.0 = Debug|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Release|Any CPU.Build.0 = Release|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Release|x64.ActiveCfg = Release|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Release|x64.Build.0 = Release|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Release|x86.ActiveCfg = Release|Any CPU + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD}.Release|x86.Build.0 = Release|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Debug|x64.ActiveCfg = Debug|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Debug|x64.Build.0 = Debug|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Debug|x86.ActiveCfg = Debug|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Debug|x86.Build.0 = Debug|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Release|Any CPU.Build.0 = Release|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Release|x64.ActiveCfg = Release|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Release|x64.Build.0 = Release|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Release|x86.ActiveCfg = Release|Any CPU + {45EBB278-46D3-40D3-B358-0EBDC622F377}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {ED9B6918-1129-485F-9278-F9BCF13FE161} = {C8AB039C-E368-4C51-920D-06F2CEB2C95A} {4F7DCA8A-8B67-4277-8F14-FA43E479CB9B} = {A7EC3CF5-76B0-4235-AE9F-05409E3308B9} + {E7A3F143-197B-49D2-BDF1-AC6FFE64C5AD} = {A7EC3CF5-76B0-4235-AE9F-05409E3308B9} + {45EBB278-46D3-40D3-B358-0EBDC622F377} = {C8AB039C-E368-4C51-920D-06F2CEB2C95A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EA12D69B-8232-40F9-98F8-8A1C73796BFE} -- cgit