[Vm-dev] Why StandardFileStream fileID is 16 bytes in Linux while 20 bytes in OSX?

Eliot Miranda eliot.miranda at gmail.com
Sun Jan 10 00:59:56 UTC 2016



> On Jan 9, 2016, at 2:46 PM, Mariano Martinez Peck <marianopeck at gmail.com> wrote:
> 
> 
> 
>> On Sat, Jan 9, 2016 at 12:45 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>  
>> My guess is that the VM is being built, wrongly, without 64-bit file sizes.  In the Squeak VM this is definitely not 16 bytes.
> 
> Hi Eliot, 
> 
> Thank you very much!! You nailed it :)  It is indeed that the fileSize in Linux VM is 4 bytes and not 8 as for OSX.
> 
> You said that in the SqueakVM it is 64 bits. By SqueakVM you mean your Cog (and not our Pharo builds) or you mean the old interpreter VM?
> 
> Should I open an issue somewhere so that we can make it 64 bits file size?

Yes.  This is a painful error.  Windows Linux and Mac is all support files > 4gb and Pharo should be able to access them.

> Thanks advance,
> 
> 
>> _,,,^..^,,,_ (phone)
>> 
>>> On Jan 9, 2016, at 7:06 AM, Mariano Martinez Peck <marianopeck at gmail.com> wrote:
>>> 
>>> Hi guys,
>>> 
>>> In OSX, StandardFileStream byteID size is 20, while in Linux, it is 16. I see this definition in  ./Cross/plugins/FilePlugin/FilePlugin.h 
>>> 
>>> 
>>> /* squeak file record; see sqFilePrims.c for details */
>>> typedef struct {
>>>   int                    sessionID;     /* ikp: must be first */  
>>>   void                  *file;
>>>   squeakFileOffsetType   fileSize;      /* 64-bits we hope. */
>>> #if defined(ACORN)
>>> // ACORN has to have 'lastOp' as at least a 32 bit field in order to work
>>>   int lastOp; // actually used to save file position
>>>   char writable;
>>>   char lastChar;
>>>   char isStdioStream;
>>> #else
>>>   char                   writable;
>>>   char                   lastOp; /* 0 = uncommitted, 1 = read, 2 = write */
>>>   char                   lastChar;
>>>   char                   isStdioStream;
>>> #endif
>>> } SQFile;
>>> 
>>> And I see no override from UNIX platform code. So...how can that be 16 bytes in Linux?
>>> 
>>> Thanks in advance, 
>>> 
>>> 
>>> 
>>> -- 
>>> Mariano
>>> http://marianopeck.wordpress.com
> 
> 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160109/64e4bb51/attachment.htm


More information about the Vm-dev mailing list