Memory Mapped Files in QNX 6.2.0?

Does QNX 6.2.0 support memory mapped files? I used to do:

memory = mmap(0, file_sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);

on Solaris to create a memory mapped file. The same thing doesn’t work on QNX.
Am I calling it wrong or is it simply not supported?

…Stephen

Stephen Rasku <spr@shaw.ca> wrote:

Does QNX 6.2.0 support memory mapped files? I used to do:

memory = mmap(0, file_sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);

on Solaris to create a memory mapped file. The same thing doesn’t work on QNX.
Am I calling it wrong or is it simply not supported?

QNX doesn’t support syncing the mapped data back to disc. So if you want to
do this you also have to add MAP_NOSYNCFILE to the flags.

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/