<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"><<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>></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>
> On linux? What's the failure mode in your snippet? The position:<br>
> 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: 'sizeof(squeakFileOffsetType)'.</div><div><span class="" style="white-space:pre">                </span>(interpreterProxy byteSizeOf: (interpreterProxy stackValue: 0)) > 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)) > (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>
><br>
><br>
> On Thu, Sep 4, 2014 at 3:36 PM, Chris Muller <<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>> wrote:<br>
><br>
> > Hi Eliot, it looks like any attempt to position a file beyond some<br>
> > threshold is causing the primitive failure in Cog VM's released after<br>
> > 2776 that I'm seeing.<br>
> ><br>
> > | file | file:=StandardFileStream newFileNamed: 'mybigfile'. file binary.<br>
> > [1234 timesRepeat: [ file nextPutAll: (ByteArray new: 1 million) ].<br>
> > file position: file size - 100 ]<br>
> > ensure: [file close].<br>
> ><br>
> > Magma uses a random file position for every single object retrieved;<br>
> > so the performance of primitiveFileSetPosition is crucial to the<br>
> > performance of Magma.<br>
> ><br>
> > Thanks.<br>
> ><br>
><br>
><br>
><br>
> --<br>
> best,<br>
> Eliot<br>
><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>