changed the memory limits in drscheme to match the new way they work

svn: r12873
This commit is contained in:
Robby Findler 2008-12-16 20:57:52 +00:00
parent f74dc2b8c7
commit aa749bfe1f
9 changed files with 15 additions and 15 deletions

View File

@ -94,10 +94,10 @@
(number? (car x)) (number? (car x))
(number? (cdr x)))))) (number? (cdr x))))))
(preferences:set-default 'drscheme:memory-limit (* 1024 1024 128) (preferences:set-default 'drscheme:child-only-memory-limit (* 1024 1024 64)
(λ (x) (or (boolean? x) (λ (x) (or (boolean? x)
(integer? x) (integer? x)
(x . >= . (* 1024 1024 100))))) (x . >= . (* 1024 1024 1)))))
(preferences:set-default 'drscheme:recent-language-names (preferences:set-default 'drscheme:recent-language-names
null null

View File

@ -867,7 +867,7 @@ TODO
(memory-killed-thread #f) (memory-killed-thread #f)
(user-custodian #f) (user-custodian #f)
(custodian-limit (and (custodian-memory-accounting-available?) (custodian-limit (and (custodian-memory-accounting-available?)
(preferences:get 'drscheme:memory-limit))) (preferences:get 'drscheme:child-only-memory-limit)))
(user-eventspace-box (make-weak-box #f)) (user-eventspace-box (make-weak-box #f))
(user-namespace-box (make-weak-box #f)) (user-namespace-box (make-weak-box #f))
(user-eventspace-main-thread #f) (user-eventspace-main-thread #f)
@ -925,7 +925,7 @@ TODO
(field (need-interaction-cleanup? #f)) (field (need-interaction-cleanup? #f))
(define/private (no-user-evaluation-message frame exit-code memory-killed?) (define/private (no-user-evaluation-message frame exit-code memory-killed?)
(let* ([new-limit (and custodian-limit (+ (* 1024 1024 128) custodian-limit))] (let* ([new-limit (and custodian-limit (+ (* 1024 1024 32) custodian-limit))]
[ans (message-box/custom [ans (message-box/custom
(string-constant evaluation-terminated) (string-constant evaluation-terminated)
(string-append (string-append
@ -953,7 +953,7 @@ TODO
)]) )])
(when (equal? ans 3) (when (equal? ans 3)
(set-custodian-limit new-limit) (set-custodian-limit new-limit)
(preferences:set 'drscheme:memory-limit new-limit)) (preferences:set 'drscheme:child-only-memory-limit new-limit))
(set-insertion-point (last-position)) (set-insertion-point (last-position))
(insert-warning "\nInteractions disabled"))) (insert-warning "\nInteractions disabled")))

View File

@ -3292,10 +3292,10 @@ module browser threading seems wrong.
(when num (when num
(cond (cond
[(eq? num #t) [(eq? num #t)
(preferences:set 'drscheme:memory-limit #f) (preferences:set 'drscheme:child-only-memory-limit #f)
(send interactions-text set-custodian-limit #f)] (send interactions-text set-custodian-limit #f)]
[else [else
(preferences:set 'drscheme:memory-limit (preferences:set 'drscheme:child-only-memory-limit
(* 1024 1024 num)) (* 1024 1024 num))
(send interactions-text set-custodian-limit (send interactions-text set-custodian-limit
(* 1024 1024 num))]))))])) (* 1024 1024 num))]))))]))
@ -3844,7 +3844,7 @@ module browser threading seems wrong.
[parent hp] [parent hp]
[init-value (if current-limit [init-value (if current-limit
(format "~a" current-limit) (format "~a" current-limit)
"128")] "64")]
[stretchable-width #f] [stretchable-width #f]
[min-width 100] [min-width 100]
[callback [callback
@ -3886,7 +3886,7 @@ module browser threading seems wrong.
(let* ([n (string->number (send txt get-text))]) (let* ([n (string->number (send txt get-text))])
(and n (and n
(integer? n) (integer? n)
(100 . <= . n)))) (1 . <= . n))))
(define (background sd) (define (background sd)
(let ([txt (send tb get-editor)]) (let ([txt (send tb get-editor)])

View File

@ -862,7 +862,7 @@ please adhere to these guidelines:
(force-quit-menu-item-help-string "Uses custodian-shutdown-all to abort the current evaluation") (force-quit-menu-item-help-string "Uses custodian-shutdown-all to abort the current evaluation")
(limit-memory-menu-item-label "Limit Memory...") (limit-memory-menu-item-label "Limit Memory...")
(limit-memory-msg-1 "The limit will take effect the next time the program") (limit-memory-msg-1 "The limit will take effect the next time the program")
(limit-memory-msg-2 "is Run, and it must be at least 100 megabytes.") (limit-memory-msg-2 "is Run, and it must be at least one megabyte.")
(limit-memory-unlimited "Unlimited") (limit-memory-unlimited "Unlimited")
(limit-memory-limited "Limited") (limit-memory-limited "Limited")
(limit-memory-megabytes "Megabytes") (limit-memory-megabytes "Megabytes")

View File

@ -859,7 +859,7 @@
(force-quit-menu-item-help-string "Utilise custodian-shutdown-all pour terminer toute l'évaluation courante") (force-quit-menu-item-help-string "Utilise custodian-shutdown-all pour terminer toute l'évaluation courante")
(limit-memory-menu-item-label "Limiter la mémoire...") (limit-memory-menu-item-label "Limiter la mémoire...")
(limit-memory-msg-1 "La limite prendra effet à la prochaine exécution du programme.") (limit-memory-msg-1 "La limite prendra effet à la prochaine exécution du programme.")
(limit-memory-msg-2 "Elle doit être d'au moins 100 megaoctets.") (limit-memory-msg-2 "Elle doit être d'au moins 1 megaoctet.")
(limit-memory-unlimited "Illimitée") (limit-memory-unlimited "Illimitée")
(limit-memory-limited "Limitée") (limit-memory-limited "Limitée")
(limit-memory-megabytes "Megaoctets") (limit-memory-megabytes "Megaoctets")

View File

@ -763,7 +763,7 @@
(force-quit-menu-item-help-string "Benutzt custodian-shutdown-all, um die Auswertung abzubrechen") (force-quit-menu-item-help-string "Benutzt custodian-shutdown-all, um die Auswertung abzubrechen")
(limit-memory-menu-item-label "Speicherverbrauch einschränken...") (limit-memory-menu-item-label "Speicherverbrauch einschränken...")
(limit-memory-msg-1 "Das Limit wird beim nächsten Programmstart aktiv") (limit-memory-msg-1 "Das Limit wird beim nächsten Programmstart aktiv")
(limit-memory-msg-2 "und muß mindestens 100 Megabytes betragen.") (limit-memory-msg-2 "und muß mindestens 1 Megabyte betragen.")
(limit-memory-unlimited "nicht einschränken") (limit-memory-unlimited "nicht einschränken")
(limit-memory-limited "einschränken") (limit-memory-limited "einschränken")
(limit-memory-megabytes "Megabytes") (limit-memory-megabytes "Megabytes")

View File

@ -805,7 +805,7 @@ please adhere to these guidelines:
(kill-menu-item-help-string "現在の評価を強制終了します") (kill-menu-item-help-string "現在の評価を強制終了します")
(limit-memory-menu-item-label "メモリを制限する...") (limit-memory-menu-item-label "メモリを制限する...")
(limit-memory-msg-1 "ここで指定したメモリ制限値は、プログラムを次に実行するときに有効になります。") (limit-memory-msg-1 "ここで指定したメモリ制限値は、プログラムを次に実行するときに有効になります。")
(limit-memory-msg-2 "制限値は 100MB 以上にしてください。") (limit-memory-msg-2 "制限値は 1MB 以上にしてください。")
(limit-memory-unlimited "制限しない") (limit-memory-unlimited "制限しない")
(limit-memory-limited "制限する") (limit-memory-limited "制限する")
(limit-memory-megabytes "MB") (limit-memory-megabytes "MB")

View File

@ -780,7 +780,7 @@
(force-quit-menu-item-help-string "使用custodian-shutdown-all退出当前计算") (force-quit-menu-item-help-string "使用custodian-shutdown-all退出当前计算")
(limit-memory-menu-item-label "限制内存使用...") (limit-memory-menu-item-label "限制内存使用...")
(limit-memory-msg-1 "内存限制会在下一次运行") (limit-memory-msg-1 "内存限制会在下一次运行")
(limit-memory-msg-2 "时生效。内存限制最低值为100megabytes.") (limit-memory-msg-2 "时生效。内存限制最低值为1megabyte.")
(limit-memory-unlimited "无限制") (limit-memory-unlimited "无限制")
(limit-memory-limited "限制") (limit-memory-limited "限制")
(limit-memory-megabytes "Megabytes") (limit-memory-megabytes "Megabytes")

View File

@ -779,7 +779,7 @@
(force-quit-menu-item-help-string "使用custodian-shutdown-all退出当前计算") (force-quit-menu-item-help-string "使用custodian-shutdown-all退出当前计算")
(limit-memory-menu-item-label "限制内存使用...") (limit-memory-menu-item-label "限制内存使用...")
(limit-memory-msg-1 "内存限制会在下一次运行") (limit-memory-msg-1 "内存限制会在下一次运行")
(limit-memory-msg-2 "时生效。内存限制最低值为100megabytes.") (limit-memory-msg-2 "时生效。内存限制最低值为1megabyte.")
(limit-memory-unlimited "无限制") (limit-memory-unlimited "无限制")
(limit-memory-limited "限制") (limit-memory-limited "限制")
(limit-memory-megabytes "Megabytes") (limit-memory-megabytes "Megabytes")