Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Problems with qnx_osinfo() and freememk member of _osinfo structure
Ref. No. QNX.000010020
Category(ies) Development
Issue The freememk member of the _osinfo structure has
unsigned short type. Thus qnx_osinfo() returns
incorrect value of free memory if its size is
more than 64M.
Is there another way to get free memory size?

Solution Use freepmem instead.

Here's the description of all the fields:

short unsigned cpu_speed
  A PC is around 96.

short unsigned num_procs
  Max number of processes.

short unsigned tick_size
  Tick size, in microsecond units.

short unsigned version
  Version number of QNX * 100.

short unsigned timesel
  Segment in which the time is kept.

short unsigned totmemk
  Use totpmem instead.

short unsigned freememk
  Use freepmem instead.

char release
  Release letter.

long sflags
  System flags, as defined below.

long nodename
  Logical node number of this cpu.

long cpu
  Processor type 386, 486, 586, 686, ...

long fpu
  Floating-point unit 287, 387, 487. 587, 687.

char machine[16]
  Machine name. Examples include EISA, PCI, PS/2, and ziatech.

char bootsrc
  'F' - floppy 'H' - hard disk 'N' - network

short unsigned num_names
  Maximum number of names.

short unsigned num_timers
  Maximum number of timers.

short unsigned num_sessions
  Maximum number of sessions.

short unsigned num_handlers
  Maximum number of interrupt handlers.

short unsigned reserve64k
Relocation offset (see -R option to Proc).

short unsigned max_nodes
  Number of nodes you are licensed for.

short unsigned proc_freemem
  Not used.

short unsigned fd_freemem
  Not used.

short unsigned ldt_freemem
  Not used.

short unsigned num_fds[3]
  Number of file descriptors (see -f option to Proc).