From owner-freebsd-hackers Thu Nov 8 8:12:32 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 9889737B422 for ; Thu, 8 Nov 2001 08:12:30 -0800 (PST) Received: from onyx (onyx.cs.binghamton.edu [128.226.140.171]) by bingnet2.cc.binghamton.edu (8.11.6/8.11.6) with ESMTP id fA8GCT717197 for ; Thu, 8 Nov 2001 11:12:29 -0500 (EST) Date: Thu, 8 Nov 2001 11:11:11 -0500 (EST) From: Zhihui Zhang X-Sender: zzhang@onyx To: freebsd-hackers@freebsd.org Subject: Debugging memory leak Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I am debugging a KLD. After each run, there is always some memory in use as indicated by vmstat -m. In other words, some memory are still in use by the KLD. Is there any way to detect the memory leak? After I do kldunload, all memory used by it is gone. But I doubt that the memory is actually returned to the global pool. Probably, it is only the statistical information is gone. Any help or suggestion is appreciated. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message