Re: SEC_COMMIT usefulness in CreateFileMapping API

Windows CE does not use a page file, which means that non file-backed data (such as a memory mapped file without a base file in the filesystem) will never be paged out to disk.


Good luck,

Michel Verhagen, eMVP
Check out my blog:

Microsoft Embedded Partner
Consultancy, training and development services.

curious1 wrote:
Hi All,

I am trying to understand importance of SEC_COMMIT section attibute when using CreateFileMapping API to share mapped file between two processes.

I am using hFile as INVALID_HANDLE_VALUE. which means no file is created in filesystem, so file will will be mapped into memory directly. How can I prevent this file frombeing paged out of memory and in case it is paged out, will the OS save this somewhere on filesystem ? How will this work if I have not given a valid file handle (basically no file exist in filesystem) ?

please help me understand this. I truly appreciate your time ...

thanks !

HANDLE CreateFileMapping(
HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMappingAttributes, DWORD flProtect, DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCTSTR lpName );


Relevant Pages

  • AIX 5.2 maxperm & Oracle
    ... maxperm was set to 63%, ... large volumes of data IO going through the AIX filesystem cache). ... for memory with filesystem cache. ...
  • Re: compiling root filesystem into kernel (preferably tmpfs root filesystem)
    ... compiling root filesystem into kernel ... (read only roots backed by media other than memory). ... Next, DO NOT compress the image with mkuzip, instead do: ...
  • Re: [00/17] Large Blocksize Support V3
    ... to lock the filesystem block and prevent any updates to it, ... get 128 pages into a bio so all we've done churned some in memory ... I/O no faster than the current code. ... We can't use buffer heads - they can only point ...
  • Re: compiling root filesystem into kernel (preferably tmpfs root filesystem)
    ... the statically compiled-in root file system. ... you can compile a fs image into the kernel. ... binaries being on a read only filesystem backed by the install DVD?) ... (read only roots backed by media other than memory). ...
  • Re: ZFS vs OSX Time Machine
    ... If it's a separate filesystem, ... GET'ing are using the ZFS filesystem. ... I'll try but I would expect backup over wireless to cause less of a performance degradation of other ZFS consumers because the backup is being throttled by it. ... This could be a memory performance or fragmentation problem then. ...