From owner-freebsd-questions Fri Jun 30 9:59:41 2000 Delivered-To: freebsd-questions@freebsd.org Received: from majordomo2.umd.edu (majordomo2.umd.edu [128.8.10.7]) by hub.freebsd.org (Postfix) with ESMTP id EC65037B5A0 for ; Fri, 30 Jun 2000 09:59:37 -0700 (PDT) (envelope-from culverk@wam.umd.edu) Received: from rac6.wam.umd.edu (root@rac6.wam.umd.edu [128.8.10.146]) by majordomo2.umd.edu (8.9.3/8.9.3) with ESMTP id MAA00422; Fri, 30 Jun 2000 12:59:30 -0400 (EDT) Received: from rac6.wam.umd.edu (sendmail@localhost [127.0.0.1]) by rac6.wam.umd.edu (8.9.3/8.9.3) with SMTP id MAA12488; Fri, 30 Jun 2000 12:59:32 -0400 (EDT) Received: from localhost (culverk@localhost) by rac6.wam.umd.edu (8.9.3/8.9.3) with ESMTP id MAA12484; Fri, 30 Jun 2000 12:59:32 -0400 (EDT) X-Authentication-Warning: rac6.wam.umd.edu: culverk owned process doing -bs Date: Fri, 30 Jun 2000 12:59:32 -0400 (EDT) From: Kenneth Wayne Culver To: Paul Herman Cc: Harry Newton , freebsd-questions@FreeBSD.ORG Subject: Re: what is active/inactive memory (was Re: memory leak?) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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