[plt-scheme] current-memory-use returning a negative number

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jul 30 12:31:48 EDT 2007

At Mon, 30 Jul 2007 15:58:38 +0100, Dave Gurnell wrote:
> I've noticed some odd behaviour (negative return values) from current- 
> memory-use running MzScheme v370.6 on Debian. It looks like an  
> overflow at around (* 1024 1024 1024) bytes. Is this expected  
> behaviour, or might there be a bug?

Bug. 

The implementation of `current-memory-use' assumed that the result
would always fit in a fixnum --- but it doesn't if you're using more
than 1GB of memory on a 32-bit platform. This assumption is now fixed
in SVN, and hopefully that fixes the bug.

Thanks,
Matthew



Posted on the users mailing list.