From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 29 14:27:56 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BD3CEBD7 for ; Fri, 29 Mar 2013 14:27:56 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [188.252.31.196]) by mx1.freebsd.org (Postfix) with ESMTP id 4127B8AE for ; Fri, 29 Mar 2013 14:27:55 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.6/8.14.5) with ESMTP id r2TERd9g058827; Fri, 29 Mar 2013 15:27:39 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.6/8.14.5/Submit) with ESMTP id r2TERdOx058824; Fri, 29 Mar 2013 15:27:39 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Fri, 29 Mar 2013 15:27:39 +0100 (CET) From: Wojciech Puchar To: Rod Person Subject: Re: Help porting Linux app - getting Free Memory and Real Memory In-Reply-To: <5156316F.9050202@rodperson.com> Message-ID: References: <5156316F.9050202@rodperson.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Fri, 29 Mar 2013 15:27:39 +0100 (CET) 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 14:27:56 -0000 > I'm working on a port I maintain and the code has drastically changed. > Everything is going we except that the program gives warnings that there > isn't enough free memory on the system to perform certain actions. > The program uses Linux call to /proc/meminfo to get this information. this is just a nonsense. the only thing program should check is data size limit. man getrlimit. RLIMIT_DATA is fine. unices (including linux) have virtual memory. providing enough total VM is a job for sysadmin. checking available memory by one program doesn't make much sense, as other programs are running in the same time.