From owner-freebsd-questions Fri Jun 30 9:51: 9 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.netcologne.de (mail2.netcologne.de [194.8.194.103]) by hub.freebsd.org (Postfix) with ESMTP id A4CA337B738 for ; Fri, 30 Jun 2000 09:51:01 -0700 (PDT) (envelope-from pherman@frenchfries.net) Received: from bagabeedaboo.security.at12.de (dial-194-8-209-93.netcologne.de [194.8.209.93]) by mail2.netcologne.de (8.9.3/8.9.3) with ESMTP id SAA06041; Fri, 30 Jun 2000 18:50:50 +0200 (MET DST) Received: from localhost (localhost.security.at12.de [127.0.0.1]) by bagabeedaboo.security.at12.de (8.10.2/8.10.2) with ESMTP id e5UGoVS02973; Fri, 30 Jun 2000 18:50:31 +0200 (CEST) Date: Fri, 30 Jun 2000 18:50:30 +0200 (CEST) From: Paul Herman To: Kenneth Wayne Culver 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message