Date: Wed, 22 Mar 2000 16:05:27 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: "Kave p.Ram" <hotkaveh@hotmail.com> Cc: questions@FreeBSD.ORG Subject: Re: memory management in BSD Message-ID: <20000322160527.C21029@fw.wintelcom.net> In-Reply-To: <20000322230800.48079.qmail@hotmail.com>; from hotkaveh@hotmail.com on Wed, Mar 22, 2000 at 11:08:00PM %2B0000 References: <20000322230800.48079.qmail@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Kave p.Ram <hotkaveh@hotmail.com> [000322 15:52] wrote: > Hi ! > > I have a question on memory management in FreeBSD . > suppose i write a bogus piece of software which just allocates > about 5 Mb of memory without freeing it later . > > if i run this software 10 times then I have allocated totally about > 50 Mb of available memory. (but not at once) > > my question is : if a dumb person like me forget to free the allocated > memory dedicated to this piece of code , how does the system (after the end > of execution ) knows that those memory areas that this software used is free > to reuse ? When the program exits its memory will be free'd back to the system, if the program doesn't exit and the memory is needed, it's likely that the memory will be swapped out to disk, if you run out of swap and memory the system is likely to get cranky and nuke a process in order to free up some resources. -Alfred 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?20000322160527.C21029>