[Vm-dev] Re: [squeak-dev] What is the upper memory limits of Cog?
David T. Lewis
lewis at mail.msen.com
Fri Sep 26 12:08:35 UTC 2014
On Thu, Sep 25, 2014 at 11:28:04PM -0500, Chris Muller wrote:
>
> I have had to put memory-checking into my code and terminate "stale"
> resources when it hits the ceiling. Part of my memory-checking logic
> relies on (Smalltalk vmParameterAt: 3) to estimate available memory,
> but since it is returning -868260916 (that's right, --negative--) for
> that value, my assumptions that it would always be positive were wrong
> and that explains why the memory-checking is not working correctly.
>
> Is something possibly wrong that this is negative? Am I supposed to
> take the absolute value of it?
It's probably a VM buglet, an unsigned address is being returned as a signed integer.
To illustrate, load package TwosComplement from SqueakMap, then:
-868260916 asRegister asUnsignedInteger ==> 3426706380
Dave
More information about the Vm-dev
mailing list