From patchwork Fri Mar 1 11:49:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dodji at seketeli dot org X-Patchwork-Id: 86639 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 988123858D39 for ; Fri, 1 Mar 2024 11:49:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 988123858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1709293787; bh=ehBMmVM+sCngdwknOxDUPlPrQCGpA/OBrAKc5D5xoFs=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=XQM4xr/6EL68PCLF8HmDokIWxFozJmhymFmcIPLpf8KyP5zNJSAxgZCFOZI/CIwjX wP8jTgH/Wpme/qDwny9qk95JI+H+UfkrnfDF9fK7dMK1z8REg8RnGrj7Qewo9IB+a/ aInUQUq9ChkXb5U9fJ+krD4HgB3QzOdfclJFnhII= X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: by sourceware.org (Postfix, from userid 48) id D2BF73858C35; Fri, 1 Mar 2024 11:49:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2BF73858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1709293769; bh=ehBMmVM+sCngdwknOxDUPlPrQCGpA/OBrAKc5D5xoFs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=l5HM5miEWIdST+JX7Umr3ng6mDiZAkvFU1hsQIeVTAahGOZ/LPDe/NSLgSuCqLhTN QuN3oWdHziq9io78Q2FdCsSI5Yn9uYHvz8tgAJMrjMSFuCWpqhm/BZX4E+Ia53TVh1 0qgExI9CeBydDf2RTvXA+/e1XMSJ/d8THHJAg+UE= From: "dichen at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/31103] periodically malloc_trim() Date: Fri, 01 Mar 2024 11:49:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: debuginfod X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dichen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dichen at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org https://sourceware.org/bugzilla/show_bug.cgi?id=31103 --- Comment #1 from Di Chen --- Hey Frank, Are you talking about a change like this? ``` fdcache.limit(0,0,0,0); // release the fdcache contents ``` 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 #include #include +#include /* 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