From owner-freebsd-hackers Tue Oct 2 14:22:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtpproxy1.mitre.org (smtpproxy1.mitre.org [129.83.20.90]) by hub.freebsd.org (Postfix) with ESMTP id 1B9DF37B408 for ; Tue, 2 Oct 2001 14:22:20 -0700 (PDT) Received: from avsrv1.mitre.org (avsrv1.mitre.org [129.83.20.58]) by smtpproxy1.mitre.org (8.11.3/8.11.3) with ESMTP id f92LLuE05147; Tue, 2 Oct 2001 17:21:57 -0400 (EDT) Received: from MAILHUB1 (mailhub1.mitre.org [129.83.20.31]) by smtpsrv1.mitre.org (8.11.3/8.11.3) with ESMTP id f92LLtf04388; Tue, 2 Oct 2001 17:21:55 -0400 (EDT) Received: from dhcp-105-164.mitre.org (128.29.105.164) by mailhub1.mitre.org with SMTP id 7809085; Tue, 02 Oct 2001 17:21:05 -0400 Message-ID: <3BBA2FF1.84FF06AC@mitre.org> Date: Tue, 02 Oct 2001 17:21:53 -0400 From: Jason Andresen Organization: The MITRE Corporation X-Mailer: Mozilla 4.75 [en]C-20000818M (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Dwayne.MacKinnon@xwave.com Cc: freebsd-hackers@freebsd.org Subject: Re: Memory allocation question References: <3BBA29C0.5E125DAF@xwave.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dwayne wrote: > > Hi, > > I'm creating an app where I want to use memory to store data so I > can get at it quickly. The problem is, I can't afford the delays that > would occur if the memory gets swapped out. Is there any way in FreeBSD > to allocate memory so that the VM system won't swap it out? It's not a 100% guarentee IIRC, but I think madvise(2) can tell FreeBSD to try it's best to not swap out parts of memory. -- \ |_ _|__ __|_ \ __| Jason Andresen jandrese@mitre.org |\/ | | | / _| Network and Distributed Systems Engineer _| _|___| _| _|_\___| Office: 703-883-7755 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message