Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Sep 2002 16:26:57 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        "Coleman, Ellery" <ellery.coleman@medtronic.com>
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>
In-Reply-To: <913C3C216F747D4289B2E9151578E9B4390AD9@LAXM1BMSGM50.ent.core.medtronic.com>; from ellery.coleman@medtronic.com on Fri, Sep 27, 2002 at 04:01:37PM -0700
References:  <913C3C216F747D4289B2E9151578E9B4390AD9@LAXM1BMSGM50.ent.core.medtronic.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020927162656.A25196>