diff options
| author | root <[email protected]> | 2023-10-17 09:16:25 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2023-10-17 09:16:25 +0000 |
| commit | fc96d258c56ba5e48f5d6307ea7680cb77db82eb (patch) | |
| tree | 4c5ce57821a2d3345eb2c14000dcb67ec7cb5710 /shaping/src/main.cpp | |
| parent | 32d1ede9d57af683c942d5ab0ecd41b66a1efd56 (diff) | |
TSG-15374: enable jemalloc backgroud gc thread
Diffstat (limited to 'shaping/src/main.cpp')
| -rw-r--r-- | shaping/src/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/shaping/src/main.cpp b/shaping/src/main.cpp index f9a38b2..8143bce 100644 --- a/shaping/src/main.cpp +++ b/shaping/src/main.cpp @@ -4,6 +4,7 @@ #include <unistd.h> #include <assert.h> #include <signal.h> +#include <jemalloc/jemalloc.h> #include "log.h" #include "utils.h" @@ -80,6 +81,14 @@ int main(int argc, char **argv) return -1; } + bool flag = true; + int ret = mallctl("background_thread", NULL, NULL, &flag, sizeof(flag)); + if (ret != 0) { + LOG_ERROR("%s: mallctl(background_thread) failed, ret %d", LOG_TAG_SHAPING, ret); + LOG_CLOSE(); + return -1; + } + ctx = shaping_engine_init(); if (!ctx) { return -1; |
