diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-10-06 08:18:42 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-10-06 08:18:42 +0100 |
commit | 680e7a382f9ea03568aceaf71f3fbb8ced83f76c (patch) | |
tree | 8cacca7d0d2888c85816a261499256b74559d90b /grid.c | |
parent | 847a061e31ceab5c94519fe25104e16de6a92f8d (diff) | |
download | rtmux-680e7a382f9ea03568aceaf71f3fbb8ced83f76c.tar.gz rtmux-680e7a382f9ea03568aceaf71f3fbb8ced83f76c.tar.bz2 rtmux-680e7a382f9ea03568aceaf71f3fbb8ced83f76c.zip |
glibc's malloc is very bad about returning memory from the kernel, add a call
to its malloc_trim to prompt it to do so. Reported by Sarunas Valaskevicius.
Diffstat (limited to 'grid.c')
-rw-r--r-- | grid.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -265,6 +265,9 @@ grid_free_lines(struct grid *gd, u_int py, u_int ny) for (yy = py; yy < py + ny; yy++) grid_free_line(gd, yy); +#ifdef HAVE_MALLOC_TRIM + malloc_trim(0); +#endif } /* Create a new grid. */ |