All existing systems zero anonymously mmapped memory, and if I
understand correctly POSIX will be specifying this soon. Many projects
already rely on it, so no reasonable system would return memory of
unspecified value.
return NULL;
}
- memset(mem, 0, size);
fpm_shm_size += size;
return mem;
}
perror( "Anonymous mmap() failed" );
return -1;
}
- memset( pBuf, 0, size );
g_prefork_server->m_pChildrenStatus = (lsapi_child_status *)pBuf;
g_prefork_server->m_pChildrenStatusCur = (lsapi_child_status *)pBuf;
g_prefork_server->m_pChildrenStatusEnd = (lsapi_child_status *)pBuf + size / sizeof( lsapi_child_status );