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 Shared memory and mqueue are in memory or on disk?
Ref. No. QNX.000007954
Category(ies) Utilities, Development
Issue A customer is using m_queue and shared memory.  Are the directories which house the mqueues and shared memory items (/dev/mqueue and /dev/shmem) memory resident and/or disk based?  If they are disk based, is there a way to make them memory resident only?  This would speed up the overall system throughput.





Solution Everything in /dev/shmem is in memory.  As for everything else, it gets a little more complicated.  Usually it is in memory.  But, it can also be disk based.  Shmem will decide whether it will use a memory or a disk.  There is no way to override it or force it.  A good example is the Fsys driver. If you create a file (a tmp file) it will store it in memory.  If you read from this file it is still in memory since it was not written to disk yet.  If you write the file to disk, then it will use the disk.  Basically, it will use what it needs.