Installed Memory calculations (QNX4.25)

What is the trick to determining the total installed and free memory
values on machines with more than 64M using qnx_osinfo() thesedays? The
_osinfo structure has the totmemk and freememk fields as short unsigned
int which are to small. How does sin info do it?

Geoff Roberts.

Geoff <geoff@rtts.com.au> wrote:

What is the trick to determining the total installed and free memory
values on machines with more than 64M using qnx_osinfo() thesedays? The
_osinfo structure has the totmemk and freememk fields as short unsigned
int which are to small. How does sin info do it?

From “sin.c” …

long unsigned freepmem, totpmem;

freepmem = osdata.freepmem;
if((totpmem = osdata.totpmem) == 0) {
totpmem = osdata.totmemk * 1000L;
freepmem = osdata.freememk * 1000L;
}

Look for totpmem and freepmem instead

“Geoff” <geoff@rtts.com.au> ???/??? ? ??? ???:
news:3D3E4D20.12FAA392@rtts.com.au

What is the trick to determining the total installed and free memory
values on machines with more than 64M using qnx_osinfo() thesedays? The
_osinfo structure has the totmemk and freememk fields as short unsigned
int which are to small. How does sin info do it?

Geoff Roberts.