From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 27 23:19:20 2009 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 388E4106566B for ; Fri, 27 Nov 2009 23:19:20 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from canonware.com (10140.x.rootbsd.net [204.109.63.53]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF948FC17 for ; Fri, 27 Nov 2009 23:19:20 +0000 (UTC) Received: from [IPv6:::1] (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by canonware.com (Postfix) with ESMTPSA id 3CD8828432; Fri, 27 Nov 2009 14:59:23 -0800 (PST) Message-ID: <4B1059CA.6040605@FreeBSD.org> Date: Fri, 27 Nov 2009 14:59:22 -0800 From: Jason Evans User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Maxim Sobolev References: <4B1041EB.9020109@sippysoft.com> In-Reply-To: <4B1041EB.9020109@sippysoft.com> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers Subject: Re: heap limits: mmap(2) vs. break(2) on i386 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, 27 Nov 2009 23:19:20 -0000 Maxim Sobolev wrote: > I am trying to figure out why java fails to start with 1024MB of heap on > i386 with 4GB of RAM and 4GB of swap. Both MAXDSIZ and DFLDSIZ are set > to 2GB. Some memory (1GiB?) is reserved for kernel address space, and you reserved 2GiB for DSS. That leaves less than 1GiB available after shared libraries and whatnot are mapped. If there is more than 1GiB available, mmap can still fail due to the memory being non-contiguous. Jason