diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-06 04:42:24 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-06 04:42:24 +0200 |
commit | 797a36228bdb3b77b7314585a31de6f27feab51d (patch) | |
tree | 211b9dfbfe1922ce20977618cc73c8960245b79a /src/plugins | |
parent | 8d8c01258a9414b90ecf3e1e374390543c29c4d9 (diff) |
Use malloc_trim to reduce memory usage after freeing memory
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 583bad8..0c44130 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -16,6 +16,7 @@ #include <cmath> #include <fcntl.h> #include <unistd.h> +#include <malloc.h> #include "../../include/QuickMedia.hpp" // TODO: Use string assign with string length instead of assigning to c string (which calls strlen) @@ -1249,6 +1250,7 @@ namespace QuickMedia { filter_encoded = url_param_encode(CONTINUE_FILTER); additional_messages_queue.push(true); + malloc_trim(0); } #if 0 |