It is for FreeCAD [1]:
struct sysinfo si;
int err = sysinfo( &si );
if ( err )
return -1;
static int limit = -1;
if ( limit < 0 ) {
int status = system("SMDS_MemoryLimit"); // it returns lower limit
of free RAM
if (status >= 0 ) {
limit = WEXITSTATUS(status);
}
if ( limit < 20 )
limit = 20;
else
limit = int( limit * 1.5 );
[1]
http://anonscm.debian.org/gitweb/?p=debian-science/packages/freecad.git;a=blob;f=src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp;h=08d1b66958c089e84b2e0e468b7a34f2bae58106;hb=HEAD#l68
Anton
On Sun, Jul 17, 2011 at 11:44 AM, Robert Millan <[email protected]> wrote:
> 2011/7/17 Petr Salinger <[email protected]>:
>> The GNU/kFreeBSD does not have "struct sysinfo" at all.
>
> Anton, there are usually suitable replacements. What did you need sysinfo
> for?
>
> --
> Robert Millan
>
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive:
http://lists.debian.org/CALF6qJn_HHLJ7=aMCoEQ=Rro1YNBSEv87eG4aQFKqDokm4m=6...@mail.gmail.com