diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-03-11 08:39:41 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-03-11 08:39:41 +0000 |
commit | ef9700816fd2bd521bab837ccd85e0a596aa3aa8 (patch) | |
tree | de386512df432a5f47010bca6b0f1720fe4b103b /server.c | |
parent | 12cfd0d22b630ead9c6d739b13c3409485ea551c (diff) | |
download | rtmux-ef9700816fd2bd521bab837ccd85e0a596aa3aa8.tar.gz rtmux-ef9700816fd2bd521bab837ccd85e0a596aa3aa8.tar.bz2 rtmux-ef9700816fd2bd521bab837ccd85e0a596aa3aa8.zip |
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.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -159,6 +159,10 @@ server_tidy_event(__unused int fd, __unused short events, __unused void *data) format_tidy_jobs(); +#ifdef HAVE_MALLOC_TRIM + malloc_trim(0); +#endif + log_debug("%s: took %llu milliseconds", __func__, get_timer() - t); evtimer_add(&server_ev_tidy, &tv); } |