diff options
| author | Stefan Boberg <[email protected]> | 2021-09-20 21:00:06 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-20 21:00:06 +0200 |
| commit | bee86ccf35480b1ae3066659b5b2acc3a5906db9 (patch) | |
| tree | e989a4fdc210c714ff078acb8fae2046f62a44f8 /zenserver/zenserver.cpp | |
| parent | Improved error handling in http.sys handler (diff) | |
| download | zen-bee86ccf35480b1ae3066659b5b2acc3a5906db9.tar.xz zen-bee86ccf35480b1ae3066659b5b2acc3a5906db9.zip | |
Made use of mimalloc controlled by define
When ZEN_USE_MIMALLOC is set to 0, mimalloc will not be used.
This is useful to diagnose issues with gflags and other generic analysis
tools which expect malloc/free to be used for memory management
Diffstat (limited to 'zenserver/zenserver.cpp')
| -rw-r--r-- | zenserver/zenserver.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index 62e8609f4..98ca152fa 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -16,8 +16,12 @@ #include <zenutil/zenserverprocess.h> #include <fmt/format.h> -#include <mimalloc-new-delete.h> -#include <mimalloc.h> + +#if ZEN_USE_MIMALLOC +# include <mimalloc-new-delete.h> +# include <mimalloc.h> +#endif + #include <asio.hpp> #include <exception> #include <list> @@ -569,7 +573,9 @@ main(int argc, char* argv[]) { using namespace zen; +#if ZEN_USE_MIMALLOC mi_version(); +#endif ZenServerOptions GlobalOptions; ZenServiceConfig ServiceConfig; |