[Bug debuginfod/31103] periodically malloc_trim()
dichen at redhat dot com
sourceware-bugzilla@sourceware.org
Fri Mar 1 11:49:27 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=31103
--- Comment #1 from Di Chen <dichen at redhat dot com> ---
Hey Frank,
Are you talking about a change like this?
```
diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index 524be948..fb9c1661 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -69,6 +69,7 @@ extern "C" {
#include <unistd.h>
#include <fcntl.h>
#include <netdb.h>
+#include <malloc.h>
/* If fts.h is included before config.h, its indirect inclusions may not
@@ -4197,8 +4198,7 @@ void groom()
(void) statfs_free_enough_p(db_path, "database"); // report sqlite
filesystem size
- sqlite3_db_release_memory(db); // shrink the process if possible
- sqlite3_db_release_memory(dbq); // ... for both connections
+ malloc_trim(0);
debuginfod_pool_groom(); // and release any debuginfod_client objects we've
been holding onto
fdcache.limit(0,0,0,0); // release the fdcache contents
```
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Elfutils-devel
mailing list