[Vm-dev] About SQFile's fileSize field

Levente Uzonyi leves at caesar.elte.hu
Tue Oct 10 17:09:02 UTC 2017

Hi All,

The SQFile struct[1] has a field named fileSize, which is used to cache[2] 
the size of the file when such property makes sense.
This caching behavior seems unnecessary, and it causes synchronization 
problems between multiple SQFile structures of a single file. The latter 
could be worked around by updating the cached value more often, but I was 
wondering why is the value cached at all. Does anyone know?


[1] https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/Cross/plugins/FilePlugin/FilePlugin.h
[2] https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c

More information about the Vm-dev mailing list