diff options
author | Sungguk Na <sungguk.na@samsung.com> | 2020-08-10 15:16:05 +0900 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2023-02-21 14:32:52 +0800 |
commit | b30e693569d99261cdfe3fa094e451fc8bfdb5e7 (patch) | |
tree | f8f6331b7fb427466098ddf6d91f1fad09b9e4ba /src | |
parent | 4b09b69d7159478e35135921c835cfc5a6fd8ff5 (diff) | |
download | mesa-b30e693569d99261cdfe3fa094e451fc8bfdb5e7.tar.gz mesa-b30e693569d99261cdfe3fa094e451fc8bfdb5e7.tar.bz2 mesa-b30e693569d99261cdfe3fa094e451fc8bfdb5e7.zip |
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 <sungguk.na@samsung.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/builtin_functions.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp index 84618dd4521..7cbf210c5ac 100644 --- a/src/compiler/glsl/builtin_functions.cpp +++ b/src/compiler/glsl/builtin_functions.cpp @@ -82,6 +82,7 @@ #include "glsl_parser_extras.h" #include "program/prog_instruction.h" #include <math.h> +#include <malloc.h> #include "builtin_functions.h" #include "util/hash_table.h" @@ -1449,6 +1450,7 @@ builtin_builder::release() shader = NULL; glsl_type_singleton_decref(); + malloc_trim(0); } void |