Re: Interprocess Communication & Performance
- From: "Skywing" <skywing_NO_SPAM_@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 12 Mar 2006 17:17:41 -0500
I would go for a shared file mapping - you eliminate lots of memcpy's that
way.
(Just because it is "pagefile backed" doesn't mean that it will be
continually paged out - think of it like any other VM you allocate, which
might be paged out if the system is under memory pressure or it becomes
unused for an extended period of time.)
"Jos Scherders" <thrower@xxxxxxx> wrote in message
news:%23y%23%230ohRGHA.5908@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I know these API's, they are all documented in
MSDN, but that does not answer the question.
The question is, is allocating and mapping
allocated memory myself faster then using the
file mapping stuf or is not worth the trouble. My
thought was that avoiding flushing memory to the
swap file and reading it back could be avoided and
therefore would be faster.
Any idea's ?
Jos.
"Kellie Fitton" <KELLIEFITTON@xxxxxxxxx> wrote in message
news:1142119554.874839.157820@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
Use the following APIs to allocate memory in the address space
of another process:
VirtualAllocEx()
VirtualFreeEx()
Additionally, you can use he following APIs to create shared
memory in IPC:
CreateFileMapping()
OpenFileMapping()
MapViewOfFileEx()
UnmapViewOfFile()
FlushViewOfFile()
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualallocex.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualfreeex.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfilemapping.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/openfilemapping.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/mapviewoffileex.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/unmapviewoffile.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/flushviewoffile.asp
Hope these suggestions helps,
Kellie.
.
- Follow-Ups:
- Re: Interprocess Communication & Performance
- From: Jos Scherders
- Re: Interprocess Communication & Performance
- References:
- Interprocess Communication & Performance
- From: Jos Scherders
- Re: Interprocess Communication & Performance
- From: Jos Scherders
- Interprocess Communication & Performance
- Prev by Date: Re: Interprocess Communication & Performance
- Next by Date: Re: Interprocess Communication & Performance
- Previous by thread: Re: Interprocess Communication & Performance
- Next by thread: Re: Interprocess Communication & Performance
- Index(es):
Relevant Pages
|