QNX 4.25 Free Memory

Can some one please tell me why the numbers shown with sin freemem don’t agree with sin in?

In my case I have a machine with 2 gig of RAM so sin in shows:

Memory: 1712M/2048M

Sin freemem shows:

Why do the individual chunks add up to more than the 1712M shown by sin in?

What is the best/most accurate way to determine system free memory?



I doubt that anyone without the source code can tell you precisely why. A common error in coding is in using one of three different meanings to a Meg.

1024 x 1024
1024 x 1000

I’ve seen them all appear now and then. You run into the first more often with disk space. Disk manufacturers like to make their disks sound a big as possible.

I think that there are two likely possibilities for the QNX diference.

  1. Someone made an error
  2. The two numbers are calculating slightly different things

My guess would be 2).

I do feel like the difference, 43Meg seems large, however the percentage error 43/1753 ~ %2.4 is small. If you are crowding an application in tighter than that, you are playing with fire.

Thanks Mitchell. Maybe someone from QNX will see this and take a look at the source …

Not a show stopper for me but management was asking for tests to check for free memory.

I mentioned sin freemem and sin in.

Unfortunately they noticed the difference and are now asking why …


Thanks Mitchell,

My management was asking about how to determine free memory.

I mentioned sin freemem and sin in.

Unfortunately after they used these they saw the difference between the two and are now asking why …

Hopefully someone from QNX might see this and clear up the reason for the difference.

Thanks again.


This is QNX 4. It is very hard to get QNX people to look at QNX 4 and QNX 2 issues. For a long time it hasn’t been possible to get them to look at QNX 6 Photon issues. So don’t get your hopes up.