[racket-dev] Can someone tell whats wrong with this?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Feb 28 08:58:26 EST 2011

My best guess is still that you're running out of memory in some way so
that the OS is killing the process, while forcing a GC keeps peak
memory just under some effective limit.

How much memory does running the program use (as reported by, e.g., top)?

At Sat, 26 Feb 2011 00:00:01 -0500 (EST), Hari Prashanth wrote:
> No its unlimited...
> 
> ----- Original Message -----
> From: "Matthew Flatt" <mflatt at cs.utah.edu>
> To: "Hari Prashanth" <krhari at ccs.neu.edu>
> Cc: "PLT Developers" <dev at lists.racket-lang.org>
> Sent: Friday, February 25, 2011 8:33:20 PM GMT -05:00 US/Canada Eastern
> Subject: Re: [racket-dev] Can someone tell whats wrong with this?
> 
> Do you have a `vmemoryuse' limit set?
> 
> At Fri, 25 Feb 2011 19:29:17 -0500 (EST), Hari Prashanth wrote:
> > The program is killed when the call to `collect' inside for loop is 
> > commented... I am using a fairly recent version of Racket...
> > 
> > #lang racket/load
> > 
> > (module RACKETSET racket/base
> > 
> >   (require (prefix-in rk: racket/set))
> > 
> >   (define list1 (build-list 1000000 add1))
> >   (define list2 (build-list 1000000 (λ (x) (+ x 1000000))))
> >   
> >   (define set1 (apply rk:set list1))
> >   (define set2 (apply rk:set list2))
> > 
> >   (display "Racket sets\n")
> >   (define (collect)
> >     (collect-garbage)
> >     (collect-garbage)
> >     (collect-garbage))
> >   
> >   (collect)
> >   (define sets
> >     (for ([i (in-range 10)])
> >       (time (rk:set-union set1 set2))
> >       #;(collect))))
> > 
> > swamiji at ubuntu:~/Desktop/krhari/TS$ raco make set-benchmark.rkt
> > swamiji at ubuntu:~/Desktop/krhari/TS$ racket set-benchmark.rkt
> > Racket sets
> > cpu time: 5800 real time: 5810 gc time: 520
> > cpu time: 6670 real time: 7041 gc time: 1390
> > cpu time: 5890 real time: 10478 gc time: 620
> > Killed
> > swamiji at ubuntu:~/Desktop/krhari/TS$
> > 
> > _________________________________________________
> >   For list-related administrative tasks:
> >   http://lists.racket-lang.org/listinfo/dev



Posted on the dev mailing list.