<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Memory mapped files with no mapping
      file (i.e.&nbsp; file handle = 0)&nbsp; use (parts of) the system swap
      (page) file.<br>
      <br>
      If you have dynamically sized swap files, they can become very
      fragmented over time (and often are never defragmented).<br>
      <br>
      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).<br>
      <br>
      Cheers <br>
      <br>
      On 12/06/2013 3:01 p.m., Ross Levis wrote:<br>
    </div>
    <blockquote cite="mid:00b201ce6719$3476fe60$9d64fb20$@com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 3 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#1F497D">Hi Rob,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#1F497D">The sleep is in the
            separate thread, not main thread.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#1F497D">I&#8217;m not sure if in
            memory mapped files can be paged to disk but will
            investigate.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#1F497D">Cheers,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#1F497D">Ross.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"
                  lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"
                lang="EN-US"> <a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@listserver.123.net.nz">delphi-bounces@listserver.123.net.nz</a>
                [<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@listserver.123.net.nz">mailto:delphi-bounces@listserver.123.net.nz</a>] <b>On
                  Behalf Of </b>Robert Martin<br>
                <b>Sent:</b> Wednesday, 12 June 2013 9:05 AM<br>
                <b>To:</b> NZ Borland Developers Group - Delphi List<br>
                <b>Subject:</b> Re: [DUG] Memory mapped Files with no
                file<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <div>
          <p class="MsoNormal">Hi<br>
            <br>
            Don't know anything about memory mapped files but two
            comments...<br>
            <br>
            1.&nbsp; Try it without the sleep().&nbsp;&nbsp; If the sleep is in the
            main thread it could cause you problems.<br>
            2.&nbsp; Perhaps you are low on RAM and the in memory file is
            actually having to be paged to disk!&nbsp; <br>
            <br>
            Hope that's of some use :)<br>
            Rob<br>
            <br>
            On 12/06/2013 12:02 a.m., Ross Levis wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span
              style="font-size:12.0pt;color:#1F497D">I&#8217;m using a shared
              memory component in 2 apps which communicate with each
              other.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;color:#1F497D">I use a shared
              memory component which uses a memory mapped file with no
              actual file on the hard drive.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;color:#1F497D">I seem to be having
              a problem with communications between the 2 apps when the
              hard drive is busy.&nbsp; 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.&nbsp; Does that sound
              possible in your opinion?</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;color:#1F497D">It doesn&#8217;t make any
              sense to me but that&#8217;s all I can come up with currently.&nbsp;
              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.&nbsp; 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.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;color:#1F497D">Cheers,<br>
              Ross.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:&quot;Times New
              Roman&quot;,&quot;serif&quot;"><br>
              <br>
              <br>
              <o:p></o:p></span></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>NZ Borland Developers Group - Delphi mailing list<o:p></o:p></pre>
          <pre>Post: <a moz-do-not-send="true" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><o:p></o:p></pre>
          <pre>Admin: <a moz-do-not-send="true" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a><o:p></o:p></pre>
          <pre>Unsubscribe: send an email to <a moz-do-not-send="true" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe<o:p></o:p></pre>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:&quot;Times New
              Roman&quot;,&quot;serif&quot;"><br>
              <br>
              <br>
              <o:p></o:p></span></p>
          <p class="MsoNormal"
            style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
              style="font-size:12.0pt;font-family:&quot;Times New
              Roman&quot;,&quot;serif&quot;">No virus found in this
              message.<br>
              Checked by AVG - <a moz-do-not-send="true"
                href="http://www.avg.com">www.avg.com</a><br>
              Version: 2013.0.3345 / Virus Database: 3199/6402 - Release
              Date: 06/11/13<o:p></o:p></span></p>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</pre>
    </blockquote>
    <br>
  </body>
</html>