From owner-freebsd-questions@FreeBSD.ORG Sat Mar 9 23:55:37 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A2D52FB5 for ; Sat, 9 Mar 2013 23:55:37 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id 6B579141 for ; Sat, 9 Mar 2013 23:55:37 +0000 (UTC) Received: from irix.bris.ac.uk ([137.222.10.39] helo=ncs.bris.ac.uk) by dirj.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1UETbs-0005hK-AU for freebsd-questions@freebsd.org; Sat, 09 Mar 2013 23:55:30 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UETbs-0001OM-53 for freebsd-questions@freebsd.org; Sat, 09 Mar 2013 23:55:28 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.6/8.14.6) with ESMTP id r29NtRdj015519 for ; Sat, 9 Mar 2013 23:55:27 GMT (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.6/8.14.6/Submit) id r29NtRX4015510 for freebsd-questions@freebsd.org; Sat, 9 Mar 2013 23:55:27 GMT (envelope-from mexas) Date: Sat, 9 Mar 2013 23:55:27 GMT From: Anton Shterenlikht Message-Id: <201303092355.r29NtRX4015510@mech-cluster241.men.bris.ac.uk> To: freebsd-questions@freebsd.org Subject: how to forbid a process to use swap? X-Spam-Score: -3.8 X-Spam-Level: --- X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bristol.ac.uk List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2013 23:55:37 -0000 I run a program that uses large arrays. I don't want it to use swap, because it's too slow. I want the program to fail when there's not enough RAM, rather than using swap. How to do this? Is it something to do with these kernel variables: kern.dfldsiz: 34359738368 kern.dflssiz: 8388608 kern.maxdsiz: 34359738368 kern.maxssiz: 536870912 kern.maxtsiz: 134217728 Many thanks Anton