【问题标题】:Is there a way to prevent heap exhausted in common lisp有没有办法防止 common lisp 中的堆耗尽
【发布时间】:2020-03-16 11:27:20
【问题描述】:

我对lisp中的垃圾收集不太熟悉,我想知道如何管理它以避免

致命错误:*inferior-lisp* 中的垃圾收集期间堆耗尽。

SLIME 2.20 和 SBCL 2.0.1

Heap exhausted during garbage collection: 0 bytes available, 16 requested.
Gen  Boxed   Code    Raw  LgBox LgCode  LgRaw  Pin       Alloc     Waste        Trig      WP     GCs Mem-age
 1   19685      0      1      0      0      0    5   644710992    359856    21474836   19686       0  1.0000
 2   29304      0      1      0      0      0   13   960070208    196032    21474836   29305       0  0.0000
 3       0      0      0      0      0      0    0           0         0    21474836       0       0  0.0000
 4       0      0      0      0      0      0    0           0         0    21474836       0       0  0.0000
 5     367      1    130     34      0     15   51    17101008    823088    38575844     547      13  0.0000
 6     485      2    221     55      0     10    0    24716944    612720     2000000     773       0  0.0000
 7   15224      0      1      0      0      0    0   498860064     32736     2000000   15225       0  0.0000
           Total bytes allocated    =    2145459216
           Dynamic-space-size bytes =    2147483648
GC control variables:
   *GC-INHIBIT* = true
   *GC-PENDING* = true
   *STOP-FOR-GC-PENDING* = false
fatal error encountered in SBCL pid 84761(tid 0x700000026000):
Heap exhausted, game over.

Error opening /dev/tty: Device not configured
Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb> 

我正在使用一种算法来解决组合问题,您可以猜到,搜索领域呈指数级增长。增加dynamic-space-size 是没有意义的,因为这不会解决问题。所以,这个想法是在堆耗尽之前停止进程。例如,达到内存限制时的条件。

欢迎任何帮助。

【问题讨论】:

标签: garbage-collection common-lisp sbcl


【解决方案1】:

我的问题似乎没有真正的答案。 我找到了一些指导方针,可以用来管理我的问题。 以下是记录的链接:https://sourceforge.net/p/sbcl/mailman/message/30184781/https://sourceforge.net/p/sbcl/mailman/message/18414749/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-02-21
    • 2020-03-27
    • 2019-02-15
    • 2020-10-10
    • 2020-08-26
    • 1970-01-01
    • 2019-01-18
    • 1970-01-01
    相关资源
    最近更新 更多