comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Shared Memory in Windows
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Shared Memory in Windows [message #48225 is a reply to message #48224] Wed, 05 April 2006 15:11 Go to previous messageGo to previous message
Marc Reinig is currently offline  Marc Reinig
Messages: 30
Registered: June 2004
Member
> ... shared
> memory appears to be backed in the pagefile. Does that mean that I will
> have overhead due to disk IO? Or is the pagefile actually backed in RAM
> and only uses pagefile.sys when RAM is exhausted.

The second is correct. All user RAM can be swapped out during its life.
Therefore it when it is swapped out it must exist somewhere permanent so it
can be restored and brought back into RAM.

If you create a shared memory region, which is not based on an existing
file, it will be backed by the swapfile when that portion of the user's
memory is swapped out.

If it is based on a real file, when the memory is 'swapped out', the file
itself becomes the backing store.

There is no overhead until and unless it is swapped.


Marco
________________________
Marc Reinig
UCO/Lick Observatory
Laboratory for Adaptive Optics


"Robbie" <retsil@iinet.net.au> wrote in message
news:1144197125.106190.289860@v46g2000cwv.googlegroups.com.. .
>
> Just a simple performance question for shared memory in Windows...
>
> I've started aquainting myself with POSIX and SYSV shared memory in
> UNIX and I was looking for a Windows equivalent. To my dismay shared
> memory appears to be backed in the pagefile. Does that mean that I will
> have overhead due to disk IO? Or is the pagefile actually backed in RAM
> and only uses pagefile.sys when RAM is exhausted.
>
> ------------------------------------------------------------ ------------------------------------------------------------ --------------------------
>
>> From IDLs SHMMAP documentation
>
> Under Microsoft Windows, the CreateFileMapping() system call forms the
> basis for shared memory as well as memory mapped files ... To create a
> region of anonymous mapped memory instead of a mapped file, you pass a
> special file handle (0xffffffff) to CreateFileMapping(). In this case,
> the disk space used to back the shared memory is taken from the system
> pagefile.
>
> ------------------------------------------------------------ ------------------------------------------------------------ --------------------------
>
>> From the MSVC documentation for CreateFileMapping()
>
> .... In this case, CreateFileMapping creates a file mapping object of
> the specified size backed by the operating-system paging file rather
> than by a named file in the file system.
>
> ------------------------------------------------------------ ------------------------------------------------------------ --------------------------
>
> Thanks,
> Robbie
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Points in a rectangle with an angle
Next Topic: Re: Points in a rectangle with an angle

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 00:47:52 PDT 2025

Total time taken to generate the page: 0.32163 seconds