From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 29 12:34:20 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 737DA950 for ; Fri, 29 Mar 2013 12:34:20 +0000 (UTC) (envelope-from freebsd-lists@be-well.ilk.org) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1A9FA7 for ; Fri, 29 Mar 2013 12:34:20 +0000 (UTC) Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.41]) by be-well.ilk.org (Postfix) with ESMTP id F11C833C6C; Fri, 29 Mar 2013 08:34:08 -0400 (EDT) Received: by lowell-desk.lan (Postfix, from userid 1147) id EE0D939829; Fri, 29 Mar 2013 08:34:06 -0400 (EDT) From: Lowell Gilbert To: Rod Person Subject: Re: Help porting Linux app - getting Free Memory and Real Memory References: <5156316F.9050202@rodperson.com> <20130329032845.GG81066@server.rulingia.com> Date: Fri, 29 Mar 2013 08:34:06 -0400 In-Reply-To: <20130329032845.GG81066@server.rulingia.com> (Peter Jeremy's message of "Fri, 29 Mar 2013 14:28:45 +1100") Message-ID: <44li962xmp.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2013 12:34:20 -0000 Peter Jeremy writes: > On 2013-Mar-29 20:27:27 -0400, Rod Person wrote: >>Everything is going we except that the program gives warnings that there >>isn't enough free memory on the system to perform certain actions. > > That premise sounds suspiciously like the upstream author doesn't > understand how Unix VM works. To be more blunt, these checks may well be useless on Linux. On a quick look, you seem to maintain three ports: idutils, mspdebug, and jogl. I wouldn't expect a free-memory check to be appropriate on any of those. In any case, the definition of "free memory" is different between the VM systems in Linux and BSD . Even if the checks do make sense, the FreeBSD implementation would at the minimum have to include all of the pages that are allocated but not mapped.