From owner-freebsd-arch Fri Sep 27 16:27: 6 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DAEB37B401; Fri, 27 Sep 2002 16:27:04 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id A901443E65; Fri, 27 Sep 2002 16:27:03 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.3/8.12.3) with ESMTP id g8RNQvj1026813; Fri, 27 Sep 2002 16:26:57 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.3/8.12.3/Submit) id g8RNQvRg026812; Fri, 27 Sep 2002 16:26:57 -0700 Date: Fri, 27 Sep 2002 16:26:57 -0700 From: Brooks Davis To: "Coleman, Ellery" Cc: freebsd-questions@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG Subject: Re: Memory Allocation Accounting (a conceptual question) Message-ID: <20020927162656.A25196@Odin.AC.HMC.Edu> References: <913C3C216F747D4289B2E9151578E9B4390AD9@LAXM1BMSGM50.ent.core.medtronic.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <913C3C216F747D4289B2E9151578E9B4390AD9@LAXM1BMSGM50.ent.core.medtronic.com>; from ellery.coleman@medtronic.com on Fri, Sep 27, 2002 at 04:01:37PM -0700 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 27, 2002 at 04:01:37PM -0700, Coleman, Ellery wrote: >=20 > 3- If i were able to determine that a process had died without > returning all of it's memory, does the modern unix kernel provide a > mechanism that would allow me to retrieve/recycle this wasted memory? This can't happen for normal memory. The kernel tracks who has access to a page and allows the page to be reused once on one is accessing it. (It's actually more complicated then that in most modern VMs, but the principle holds.) It's still generally considered poor programming practice to fail to free() things you malloc(), but it's not actually necessicary to do so. Some forms of shared memory such as System V shared memory can persist after everyone is done using them is you don't clean up, but you'd know your were using one of those. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9lOk/XY6L6fI4GtQRAuE9AKDL5a7dQTT9qZ2EHaJ//TnQ8c4HVwCfVbnI iS35mSYwnxXgzZ+QvGUt3W8= =KWBH -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message