POSIX requires that mmap() zero any memory that it allocates. It can take a while to initialize the memory, so QNX Neutrino provides a way to relax the POSIX requirement. This allows for faster starting, but can be a security problem.
Avoiding initializing the memory requires the cooperation of the process doing the unmapping and the one doing the mapping:
int munmap_flags( void *addr, size_t len,
unsigned flags );
If you specify a flags argument of 0, munmap_flags() behaves the same as munmap() does.
The following bits control the clearing of memory on allocation:
By default, the kernel initializes the memory, but you can control this by using the -m option to procnto. The argument to this option is a string that lets you enable or disable aspects of the memory manager:
By default when memory is freed for later reuse, the contents of that memory remain untouched; whatever the application that owned the memory left behind is left intact until the next time that memory is allocated by another process. In QNX Neutrino 6.6 and later, the -m option to procnto lets you control the default behavior when unmapping: