From owner-freebsd-questions@FreeBSD.ORG Tue Nov 22 22:45:47 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E14C516A41F for ; Tue, 22 Nov 2005 22:45:47 +0000 (GMT) (envelope-from m@obmail.net) Received: from stewie.obfuscated.net (stewie.obfuscated.net [66.118.188.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB58343D7C for ; Tue, 22 Nov 2005 22:45:39 +0000 (GMT) (envelope-from m@obmail.net) Received: from [192.168.1.101] (163-2.26-24.tampabay.res.rr.com [24.26.2.163]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by stewie.obfuscated.net (Postfix) with ESMTP id C95C56117 for ; Tue, 22 Nov 2005 17:45:31 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v746.2) Content-Transfer-Encoding: 7bit Message-Id: <5F441D20-F96E-41D0-B3E2-E344B9793D8D@obmail.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: FreeBSD Mailing List From: Michael Conlen Date: Tue, 22 Nov 2005 17:45:30 -0500 X-Mailer: Apple Mail (2.746.2) Subject: mmap() X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 22:45:48 -0000 I'm running FreeBSD host 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Tue Nov 22 00:22:53 EST 2005 root@host:/usr/obj/usr/src/sys/WWW i386 I've also tried the following under 5.4-p1... I try rc = mmap(0, (891*1024*1024 + 0), 0, MAP_ANON | MAP_PRIVATE, -1, 0); and it works but If I try rc = mmap(0, (892*1024*1024 + 0), 0, MAP_ANON | MAP_PRIVATE, -1, 0); it fails returning ENOMEM. limit returns cputime unlimited filesize unlimited datasize 2096128 kbytes stacksize 1048576 kbytes coredumpsize unlimited memoryuse unlimited vmemoryuse unlimited descriptors 11095 memorylocked unlimited maxproc 5547 sbsize unlimited If the program isn't doing anything else but that is there any reason I'm getting limited in the amount of memory I can mmap() at about 892 MB? Ideally I'd like to be able to mmap most of the 2 GB available to user procs. No, using malloc() is not an option. I'm not up for maintaining a patch set to java. Oh, yes, there's plenty of free memory. Thanks