From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1B17D3858281; Tue, 12 Mar 2024 12:39:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B17D3858281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710247151; bh=T5kW9CpSlRmnb5SzoEH4AS2hhvlmG76vQ6V06NxCy0Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ldDDqznDoQGmTMGtCStEny0V8Ig3I+t/6yjokaqFxCX6TxRimC0Ia9VAatGLZNBNA lIFoLRc0Eu7bBZqd3rBgSsEf5kuR/y5llbhpBsIJQ5dkDXxxzDO0Fl8MvkKE1tnp8V oZ+z9AZ2BHYm99A2BkS/czkEaVGV6q8HppiLzfuU= From: "fche at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/31103] periodically malloc_trim() Date: Tue, 12 Mar 2024 12:39:10 +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: fche 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: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31103 --- Comment #5 from Frank Ch. Eigler --- Yeah, not surprised that there are no leaks. What this malloc_trim() and t= he preceding sqlite3_db_release_memory() calls are supposed to do is to release memory back to the operating system. So perhaps a getrusage() call in betw= een could be informative. i.e.: struct rusage pre,during,post; getrusage(RUSAGE_SELF, &pre); sqlite3_db_release_memory( ...); getrusage(RUSAGE_SELF, &during); malloc_trim(); getrusage(RUSAGE_SELF, &post); and then the ru_idrss value should show some decrease ... except on linux, ru_idrss is not supplied by the kernel. So instead something like the VmSize or VmData fields in /proc/self/status, ugh? --=20 You are receiving this mail because: You are on the CC list for the bug.=