From efc06baa70a73af73288e5b2fcf130297e3f93a4 Mon Sep 17 00:00:00 2001 From: Sungguk Na Date: Mon, 10 Aug 2020 15:16:05 +0900 Subject: [PATCH] Add malloc_trim after builtin_builder release. Memory usage pattern of Built-in builder causes large size chunk pools by glibc pool management scheme. It is not useful ,but just unnecessary expense. so malloc_trim will help to reduce memory usage in this case. Change-Id: Ia63fb2050b468e55cd6b740b6a26585ed8e824a5 Signed-off-by: Sungguk Na --- src/compiler/glsl/builtin_functions.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp index 0382ae1..2e75036 100644 --- a/src/compiler/glsl/builtin_functions.cpp +++ b/src/compiler/glsl/builtin_functions.cpp @@ -85,6 +85,7 @@ #include "glsl_parser_extras.h" #include "program/prog_instruction.h" #include +#include #include "builtin_functions.h" #include "util/hash_table.h" @@ -1455,6 +1456,7 @@ builtin_builder::release() shader = NULL; glsl_type_singleton_decref(); + malloc_trim(0); } void -- 2.7.4