~rhcarvalho/+junk/racket

« back to all changes in this revision

Viewing changes to demo/limit-memory.rkt

  • Committer: Rodolfo Carvalho
  • Date: 2011-11-13 15:03:20 UTC
  • mfrom: (50.1.7 racket)
  • Revision ID: rhcarvalho@gmail.com-20111113150320-lo1yqejh3qhs5ow2
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#lang racket
 
2
 
 
3
(define cust (make-custodian))
 
4
(custodian-limit-memory cust (* 20 1024 1024)) ;; limit memory usage to 20MB
 
5
(parameterize ([current-custodian cust])
 
6
  (let loop ([lst '()])
 
7
    (loop (cons (random 2) lst))))
 
 
b'\\ No newline at end of file'