From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 7 11:51:27 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8411B16A419 for ; Fri, 7 Dec 2007 11:51:27 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.232]) by mx1.freebsd.org (Postfix) with ESMTP id 4C70E13C455 for ; Fri, 7 Dec 2007 11:51:27 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by nz-out-0506.google.com with SMTP id l8so187169nzf for ; Fri, 07 Dec 2007 03:51:26 -0800 (PST) Received: by 10.142.201.3 with SMTP id y3mr2080497wff.1197026673007; Fri, 07 Dec 2007 03:24:33 -0800 (PST) Received: by 10.143.12.4 with HTTP; Fri, 7 Dec 2007 03:24:33 -0800 (PST) Message-ID: Date: Fri, 7 Dec 2007 13:24:33 +0200 From: "Vlad GALU" To: "Sonja Milicic" In-Reply-To: <4757F5E4.5030500@geri.cc.fer.hr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4757F5E4.5030500@geri.cc.fer.hr> Cc: freebsd-hackers@freebsd.org Subject: Re: Large array in KVM X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2007 11:51:27 -0000 On 12/6/07, Sonja Milicic wrote: > Hi everyone. > > I'm working on a kernel module that needs to maintain a large structure > in memory. As this structure could grow too big to be stored in memory, > it would be good to offload parts of it to the disk. What would be the > best way to do this? Could using a memory-mapped file help? Take a look at how the md(4) driver allocates swap-backed memory. Perhaps you could do the same for your structure, given that your swap space is big enough to hold it. > > Thanks in advance, > Sonja > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Mahnahmahnah!