[Vm-dev] Array new: SmallInteger maxVal

K. K. Subramaniam subbukk at gmail.com
Sat Oct 10 02:25:44 UTC 2009

On Friday 09 October 2009 08:04:19 pm David T. Lewis wrote:
> Assume 32 bit object memory and assume that we are rigorously using
> usqint rather than sqint for all OOP address calculations.
> Then in Intepreter>>sufficientSpaceToInstantiate:indexableSize: if we are
> trying to allocate an Array of size 16r3FFFFFFF (i.e. SmallInteger maxVal),
> then we get an arithmetic overflow when we add 2500 at the end of the
>  method.
Practical memory allocation limit is much less than 4GB (3-3.5GB?) in 32-bit 
systems because of virtual memory space reserved for process tables, file i/o 
tables etc. VM will fail long before arithmetic overflow limits are hit.


More information about the Vm-dev mailing list