From f8dff60a0143aa9a56062d62c165eca9b90bb023 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 15 Dec 2008 21:32:50 +0000 Subject: [PATCH] adjust limits on tight test, others two, clarified comments svn: r12862 --- collects/tests/mzscheme/sandbox.ss | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/collects/tests/mzscheme/sandbox.ss b/collects/tests/mzscheme/sandbox.ss index 73db336351..8c7ff62a71 100644 --- a/collects/tests/mzscheme/sandbox.ss +++ b/collects/tests/mzscheme/sandbox.ss @@ -152,7 +152,7 @@ (make-evaluator 'scheme/base '(define a (for/list ([i (in-range 10)]) (collect-garbage) - (make-string 500000)))))) + (make-string 200000)))))) =err> "out of memory")) ;; i/o @@ -423,8 +423,8 @@ --top-- (set! ev (parameterize ([sandbox-output 'bytes] [sandbox-error-output current-output-port] - [sandbox-memory-limit 20] - [sandbox-eval-limits '(0.25 15)]) + [sandbox-memory-limit 2] + [sandbox-eval-limits '(0.25 1)]) (make-evaluator 'scheme/base))) ;; GCing is needed to allow these to happen (note: the memory limit is very ;; tight here, this test usually fails if the sandbox library is not @@ -490,10 +490,11 @@ (define b 1) (length (for/fold ([v null]) ([i (in-range 20)]) - ;; Increases size of sandbox: + ;; increases size of sandbox: it's reachable from it (outside of + ;; this evaluation) because `a' is defined there (set! a (cons (make-bytes 500000) a)) (collect-garbage) - ;; Increases size of evaluation: + ;; increases size of the current evaluation (cons (make-bytes 500000) v))) =err> "out of memory" b => 1))