diff options
author | Sungguk Na <sungguk.na@samsung.com> | 2020-08-10 15:16:05 +0900 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2024-01-18 09:31:55 +0800 |
commit | efc06baa70a73af73288e5b2fcf130297e3f93a4 (patch) | |
tree | 11dd283aa98515da296cf8ac9c14dd36b7fda014 | |
parent | 66e13a73d7866a9238949d7ec09a72887062c63e (diff) | |
download | mesa-efc06baa70a73af73288e5b2fcf130297e3f93a4.tar.gz mesa-efc06baa70a73af73288e5b2fcf130297e3f93a4.tar.bz2 mesa-efc06baa70a73af73288e5b2fcf130297e3f93a4.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>
-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 0382ae1c460..2e7503629bc 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 <math.h> +#include <malloc.h> #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 |