<div dir="ltr">Hi David,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 4, 2014 at 4:10 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">On Thu, Sep 04, 2014 at 03:53:32PM -0700, Eliot Miranda wrote:<br>

&gt; On linux?  What&#39;s the failure mode in your snippet?  The position:<br>
&gt; primitive fails?<br>
<br>
<br>
</div>Probably a compile time option. For file addressing over 2GB, you need to<br>
compile with -D_FILE_OFFSET_BITS=64. Possibly something changed in the build<br>
scripts?<br></blockquote><div><br></div><div>No.  Large file support has been enabled in the builds via  -D_FILE_OFFSET_BITS=64 for a while now.  I made a transcription error when eliminating the cCode: from</div><div><br>
</div><div><div><span style="white-space:pre">                </span>sz := self cCode: &#39;sizeof(squeakFileOffsetType)&#39;.</div><div><span class="" style="white-space:pre">                </span>(interpreterProxy byteSizeOf: (interpreterProxy stackValue: 0)) &gt; sz </div>
<div><span class="" style="white-space:pre">                        </span>ifTrue: [^interpreterProxy primitiveFail]</div></div><div><br></div><div>I rewrote it as</div><div><br></div><div><div><span style="white-space:pre">                </span>(interpreterProxy byteSizeOf: (interpreterProxy stackValue: 0)) ~= (self sizeof: #squeakFileOffsetType) ifTrue:</div>
<div><span class="" style="white-space:pre">                        </span>[^interpreterProxy primitiveFail]</div></div><div><br></div><div>instead of</div><div><br></div><div><div><span style="white-space:pre">                </span>(interpreterProxy byteSizeOf: (interpreterProxy stackValue: 0)) &gt; (self sizeof: #squeakFileOffsetType) ifTrue:</div>
<div><span class="" style="white-space:pre">                        </span>[^interpreterProxy primitiveFail]</div></div><div><br></div><div>doh.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  <a href="http://users.suse.com/~aj/linux_lfs.html" target="_blank">http://users.suse.com/~aj/linux_lfs.html</a><br>
<br>
In addition to Magma, this comes into play if you make a really big 64 bit<br>
image, then try to save it. The image runs but cannot be saved unless the<br>
VM was compiled with LFS support.<br>
<br>
Dave<br>
<div class=""><div class="h5"><br>
<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Sep 4, 2014 at 3:36 PM, Chris Muller &lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hi Eliot, it looks like any attempt to position a file beyond some<br>
&gt; &gt; threshold is causing the primitive failure in Cog VM&#39;s released after<br>
&gt; &gt; 2776 that I&#39;m seeing.<br>
&gt; &gt;<br>
&gt; &gt; | file | file:=StandardFileStream newFileNamed: &#39;mybigfile&#39;.  file binary.<br>
&gt; &gt; [1234 timesRepeat: [ file nextPutAll: (ByteArray new: 1 million) ].<br>
&gt; &gt; file position: file size - 100 ]<br>
&gt; &gt;     ensure: [file close].<br>
&gt; &gt;<br>
&gt; &gt; Magma uses a random file position for every single object retrieved;<br>
&gt; &gt; so the performance of primitiveFileSetPosition is crucial to the<br>
&gt; &gt; performance of Magma.<br>
&gt; &gt;<br>
&gt; &gt; Thanks.<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; best,<br>
&gt; Eliot<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>