malloc_trim is itself very poor and gets slower and slower as the heap becomes

more fragmented. Run it only once an hour. GitHub issue 2551.
This commit is contained in:
Nicholas Marriott
2021-03-11 08:39:41 +00:00
parent 12cfd0d22b
commit ef9700816f
2 changed files with 4 additions and 3 deletions

3
grid.c
View File

@ -265,9 +265,6 @@ 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. */