[Vm-dev] Time primHighResClock truncated to 32 bits in 64 bits VMs.
Juan Vuletich
JuanVuletich at zoho.com
Thu Dec 28 12:32:46 UTC 2017
Hi Folks,
In 32 bit Cog VMs, `Time primHighResClock` answers LargePositiveInteger,
presumably up to 64 bits. This would mean a rollover in 167 years on a
3.5GHz machine.
But on 64 bit Cog and Stack Spur VMs, it answers a SmallInteger that is
truncated to 32 bits. This means a rollover in about one second.
I guesss this is a bug. Answering a SmallInteger, truncating the CPU 64
bit counter to 60 bits would be ok. I think it makes sense to restrict
answer to SmallInteger to avoid allocation, and a rollover every 41
years is not too much :)
Thanks,
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
@JuanVuletich
More information about the Vm-dev
mailing list