From owner-freebsd-ports@FreeBSD.ORG Fri Jan 27 13:38:50 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E511E16A422 for ; Fri, 27 Jan 2006 13:38:50 +0000 (GMT) (envelope-from fernan@iib.unsam.edu.ar) Received: from smtp.unsam.edu.ar (smtp.unsam.edu.ar [170.210.48.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF05843D49 for ; Fri, 27 Jan 2006 13:38:46 +0000 (GMT) (envelope-from fernan@iib.unsam.edu.ar) Received: from pi.iib.unsam.edu.ar (pi.iib.unsam.edu.ar [192.168.10.11]) by smtp.unsam.edu.ar (8.12.6/8.12.6) with ESMTP id k0RDZnUr067882 for ; Fri, 27 Jan 2006 10:35:50 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: from pi.iib.unsam.edu.ar (localhost [127.0.0.1]) by pi.iib.unsam.edu.ar (8.13.1/8.13.1) with ESMTP id k0RDcHEY095842 for ; Fri, 27 Jan 2006 10:38:17 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: (from fernan@localhost) by pi.iib.unsam.edu.ar (8.13.1/8.13.1/Submit) id k0RDcH2q095841 for ports@freebsd.org; Fri, 27 Jan 2006 10:38:17 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) X-Authentication-Warning: pi.iib.unsam.edu.ar: fernan set sender to fernan@iib.unsam.edu.ar using -f Date: Fri, 27 Jan 2006 10:38:17 -0300 From: Fernan Aguero To: FreeBSD Ports Message-ID: <20060127133817.GA89816@iib.unsam.edu.ar> Mail-Followup-To: FreeBSD Ports References: <20060124172317.GF72149@iib.unsam.edu.ar> <20060127105313.GD1141@galgenberg.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060127105313.GD1141@galgenberg.net> User-Agent: Mutt/1.5.9i Cc: Subject: Re: porting an app that checks /proc/meminfo X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2006 13:38:51 -0000 +----[ Ulrich Spoerlein (27.Jan.2006 07:53): | | Fernan Aguero wrote: | > How does one gets the values of | > i) memory used by the program/process and | | As others have already told you: getrusage(2) | | > ii) amount of RAM available in the computer without using | > /proc/meminfo in FreeBSD? | | What for? It is a rather useless value anyway. Either your malloc(3) | calls succeed or not. If they do depends not only on RAM, but on the VM, | Swap, and limits(1) (please correct me, if I'm wrong). | | So the question is, what's the value used for in his program? | | Ulrich Spoerlein | +----] Ulrich, I'm not the author, and I'm not particularly well versed in C (or in any other language that has to manage low level resources such as memory ... I'm basically a Perl/Shell guy :) But I do have some idea of what muscle is trying to do, as it is similar to other programs that implement similar algorithms. And the problem is that the input data size (DNA and/or protein sequences) is not known beforehand and can vary greatly both in the number of sequences (strings) and in the length of these sequences. So I suppose (but I'm not positive on this) that muscle is making decisions based on the size of the dataset it has been given, and it needs to have some idea of the available memory. Perhaps it will follow different strategies ... use different data structures ... Fernan