Memory mapped files with no mapping file (i.e. file handle = 0) use
(parts of) the system swap (page) file.
If you have dynamically sized swap files, they can become very
fragmented over time (and often are never defragmented).
You might want to check how fragmented the page file is, and also look
at making the size of it static (this prevents any additional
fragmentation).
Cheers
On 12/06/2013 3:01 p.m., Ross Levis wrote:
Hi Rob,
The sleep is in the separate thread, not main thread.
I'm not sure if in memory mapped files can be paged to disk but will
investigate.
Cheers,
Ross.
*From:*[email protected]
[mailto:[email protected]] *On Behalf Of *Robert Martin
*Sent:* Wednesday, 12 June 2013 9:05 AM
*To:* NZ Borland Developers Group - Delphi List
*Subject:* Re: [DUG] Memory mapped Files with no file
Hi
Don't know anything about memory mapped files but two comments...
1. Try it without the sleep(). If the sleep is in the main thread
it could cause you problems.
2. Perhaps you are low on RAM and the in memory file is actually
having to be paged to disk!
Hope that's of some use :)
Rob
On 12/06/2013 12:02 a.m., Ross Levis wrote:
I'm using a shared memory component in 2 apps which communicate
with each other.
I use a shared memory component which uses a memory mapped file
with no actual file on the hard drive.
I seem to be having a problem with communications between the 2
apps when the hard drive is busy. It appears a change to the
shared memory is not showing up in the other app for over 20
seconds while the hard drive is busy. Does that sound possible in
your opinion?
It doesn't make any sense to me but that's all I can come up with
currently. Communication appears to stop sometimes when a separate
thread starts up every 24 hours to load the contents of perhaps
3000 small files into RAM. There is a sleep(15) between access of
each file to prevent the drive being too busy, but yet this issue
can occur sometimes during the 30 odd seconds this thread is running.
Cheers,
Ross.
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post:[email protected] <mailto:[email protected]>
Admin:http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email [email protected]
<mailto:[email protected]> with Subject: unsubscribe
No virus found in this message.
Checked by AVG - www.avg.com <http://www.avg.com>
Version: 2013.0.3345 / Virus Database: 3199/6402 - Release Date:
06/11/13
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with
Subject: unsubscribe
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with
Subject: unsubscribe