[squeak-dev] Smalltalk garbageCollectMost answers negative number

David T. Lewis lewis at mail.msen.com
Fri May 23 01:06:45 UTC 2014


On Thu, May 22, 2014 at 07:11:25PM -0500, Chris Muller wrote:
> Okay, I'll try a simpler phrasing of my question in the other thread.
> If I start a stock Squeak 4.5 with:
> 
>    squeak -mmap 1500m Squeak4.5-13686.image
> 
> then:
> 
>   Smalltalk garbageCollectMost
> 
> answers a negative number.

There is a fair amount of 32/64 bit tidying up that has been done in the
trunk VM code base, some of which may not be present in the Cog branch. Or
it may be new functionality in Cog that is just missing a type declaration.

Negative address values in the object memory are an indication of missing
type declarations. Within a 32 bit object memory space, the object pointers
must be treated as unsigned values, otherwise a large address is interpreted
as a negative number. As a return value from a garbage collection primitive
this is harmless, but the more common symptom is a VM crash.

As a side note, I can summarize everything I know about 32/64 bit clean VMs
in two statements:

1) Do not try to cram 64 bit pointer address things into 32 bit integer things.

2) Object pointers are positive, do not declare them as signed twos complement.

Dave




More information about the Squeak-dev mailing list