From 78cd93f030b66912b50d264852313fe88da386fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 3 Nov 2019 12:57:47 +0100 Subject: [PATCH] terminal: malloc_trim() is a GNU extension --- terminal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/terminal.c b/terminal.c index 56cf8d69..2a9ee5bf 100644 --- a/terminal.c +++ b/terminal.c @@ -797,8 +797,12 @@ term_destroy(struct terminal *term) } free(term); + +#if defined(__GLIBC__) if (!malloc_trim(0)) LOG_WARN("failed to trim memory"); +#endif + return ret; }