[racket] Racket 5.0.1 VM out of memory during build

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Aug 10 07:06:57 EDT 2010

At Mon, 9 Aug 2010 23:33:37 +0200 (CEST), Giacomo Olgeni wrote:
> 
> Hello,
> 
> I'm trying to upgrade the FreeBSD Racket port from 5.0 to 5.0.1.
> 
> Version 5.0 builds fine, but with version 5.0.1 I get this error on 
> the same hardware/OS (FreeBSD 8.1 i386, 1 CPU):
> 
> [...]
>
> However, the swap partition is barely used, so I thought there could 
> be some default limit that I'm hitting.
> 
> Is there any way to assign more memory to the VM during the build? I'm 
> not yet familiar with the Racket build procedure so any help would be 
> very welcome :)

The problem is that 

 * Racket is consulting the `datasize' limit to determine how much
   memory it can use, and FreeBSD's `datasize' limit is normally 512MB.

 * Racket conservatively divides that limit by 2, because the GC needs
   space to perform a garbage collection when memory use is too much.

 * Version 5.0 uses sightly more memory to build than 5.0.1, pushing it
   over 256MB peak use after a GC.


After the install fails, you could try running

 racket -l setup

Probably the installation will complete, because slightly less code
will get loaded to finish up compilation instead of starting from
scratch.

You could also raise the `datasize' limit. Unfortunately, that requires
a reboot. See, for example, then page

 http://lists.freebsd.org/pipermail/freebsd-questions/2006-April/119717.html


For the next version, we've fixed Racket to consult `vmemoryuse', which
is the relevant limit and normally unlimited.



Posted on the users mailing list.