Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2000 12:59:32 -0400 (EDT)
From:      Kenneth Wayne Culver <culverk@wam.umd.edu>
To:        Paul Herman <pherman@frenchfries.net>
Cc:        Harry Newton <harry_newton@telinco.co.uk>, freebsd-questions@FreeBSD.ORG
Subject:   Re: what is active/inactive memory (was Re: memory leak?)
Message-ID:  <Pine.GSO.4.21.0006301258120.9424-100000@rac6.wam.umd.edu>
In-Reply-To: <Pine.BSF.4.21.0006301757080.224-100000@bagabeedaboo.security.at12.de>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Fri, 30 Jun 2000, Kenneth Wayne Culver wrote:
> 
> > > But what's wired memory ? In some sense the other types
> > > (active/inactive/cache/buffer) are probably what one would expect from
> > > their names, but wired ... ?
> > 
> > All I know is that's it's memory that can't be freed for one reason or
> > another... I think it's where the kernel keeps all it's data structures
> > and such...
> 
> Yup, generally, yes.  Most of it can't be freed, but there all also
> many cases where they do.
> 
> BTW, I should say that both wired and buffer memory are not part of the
>           active -> inactive -> cache -> free
> bucket chain.  (See /usr/share/doc/handbook/internals-vm.html)
> 
> Anyway, some things that go into wired memory:
> 
>   general kernel stuff:
> 	page table entries, mbufs, NIC IO buffers, DMA buffers
> 	(all contigmalloc() calls)  These buffers are generally not
> 	freed up.
> 
>   sendfile(2):
> 	pages get wired when waiting to be recieved on the other side
>         of the socket, so they don't get "ripped out from under" the
>         calling function.  they get freed.
> 
>   pipe buffers:
> 	for the same reason as sendfile(2).  Try "cat | cat | cat | ..."
> 	and watch wired fly.  they get freed.
> 
>   execve(2):
> 	a few pages of the executable vnode is mapped into wired.
> 	they get freed.
> 
> I think that's most of it, but there might be a few other cases.  (I
> double checked before opening my mouth this time, heh heh :)
> 
> -Paul.

Heh heh, yeah, I havn't actually looked at that code, I just remembered
reading about it in "The design and implementation of 4.4BSD" (I don't
know if that's the whole correct name of the book, but I think most people
here will know what I'm talking about.)



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?Pine.GSO.4.21.0006301258120.9424-100000>