[Vm-dev] Re: [squeak-dev] Re: large file support regression
Eliot Miranda
eliot.miranda at gmail.com
Thu Sep 4 23:24:41 UTC 2014
Hi David,
On Thu, Sep 4, 2014 at 4:10 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> On Thu, Sep 04, 2014 at 03:53:32PM -0700, Eliot Miranda wrote:
> > On linux? What's the failure mode in your snippet? The position:
> > primitive fails?
>
>
> Probably a compile time option. For file addressing over 2GB, you need to
> compile with -D_FILE_OFFSET_BITS=64. Possibly something changed in the
> build
> scripts?
>
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
sz := self cCode: 'sizeof(squeakFileOffsetType)'.
(interpreterProxy byteSizeOf: (interpreterProxy stackValue: 0)) > sz
ifTrue: [^interpreterProxy primitiveFail]
I rewrote it as
(interpreterProxy byteSizeOf: (interpreterProxy stackValue: 0)) ~= (self
sizeof: #squeakFileOffsetType) ifTrue:
[^interpreterProxy primitiveFail]
instead of
(interpreterProxy byteSizeOf: (interpreterProxy stackValue: 0)) > (self
sizeof: #squeakFileOffsetType) ifTrue:
[^interpreterProxy primitiveFail]
doh.
http://users.suse.com/~aj/linux_lfs.html
>
> In addition to Magma, this comes into play if you make a really big 64 bit
> image, then try to save it. The image runs but cannot be saved unless the
> VM was compiled with LFS support.
>
> Dave
>
>
> >
> >
> > On Thu, Sep 4, 2014 at 3:36 PM, Chris Muller <asqueaker at gmail.com>
> wrote:
> >
> > > Hi Eliot, it looks like any attempt to position a file beyond some
> > > threshold is causing the primitive failure in Cog VM's released after
> > > 2776 that I'm seeing.
> > >
> > > | file | file:=StandardFileStream newFileNamed: 'mybigfile'. file
> binary.
> > > [1234 timesRepeat: [ file nextPutAll: (ByteArray new: 1 million) ].
> > > file position: file size - 100 ]
> > > ensure: [file close].
> > >
> > > Magma uses a random file position for every single object retrieved;
> > > so the performance of primitiveFileSetPosition is crucial to the
> > > performance of Magma.
> > >
> > > Thanks.
> > >
> >
> >
> >
> > --
> > best,
> > Eliot
> >
>
>
>
--
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140904/04e098a0/attachment.htm
More information about the Vm-dev
mailing list