Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2006 10:38:17 -0300
From:      Fernan Aguero <fernan@iib.unsam.edu.ar>
To:        FreeBSD Ports <ports@freebsd.org>
Subject:   Re: porting an app that checks /proc/meminfo
Message-ID:  <20060127133817.GA89816@iib.unsam.edu.ar>
In-Reply-To: <20060127105313.GD1141@galgenberg.net>
References:  <20060124172317.GF72149@iib.unsam.edu.ar> <20060127105313.GD1141@galgenberg.net>

next in thread | previous in thread | raw e-mail | index | archive | help
+----[ Ulrich Spoerlein <q@galgenberg.net> (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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060127133817.GA89816>