From 8e16c57cbc371fbf06a3e2f0bdc98afb76a7efc7 Mon Sep 17 00:00:00 2001 From: Jackarain Date: Fri, 19 Jul 2024 22:30:01 +0800 Subject: [PATCH] Add snmalloc for proxy_server main.cpp --- server/proxy_server/main.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/server/proxy_server/main.cpp b/server/proxy_server/main.cpp index 6de6a5be0..ed716b0e1 100644 --- a/server/proxy_server/main.cpp +++ b/server/proxy_server/main.cpp @@ -20,9 +20,6 @@ #include namespace po = boost::program_options; -#include -namespace fs = std::filesystem; - #include "proxy/proxy_server.hpp" #include "proxy/socks_client.hpp" #include "proxy/logging.hpp" @@ -30,6 +27,15 @@ namespace fs = std::filesystem; #include "proxy/use_awaitable.hpp" #include "proxy/ipip.hpp" +#ifdef USE_SNMALLOC +# define NO_BOOTSTRAP_ALLOCATOR +# ifndef NDEBUG +# define NDEBUG +# endif +# include "src/snmalloc/override/new.cc" +#endif // USE_SNMALLOC + + #include "main.hpp" namespace net = boost::asio;