プロが教えるわが家の防犯対策術!

Maximaでそこそこ重い計算をさせているのですが、"Heap exhausted, game over"となり計算が出来ません。
どうやらメモリ不足が原因だそうですが、PC自体は性能の良いものを使っていますのでメモリを増やせば解決できると思います。
どなたか詳しい方はいらっしゃらないでしょうか。

質問者からの補足コメント

  • エラーについて(長いので分割して)貼ります。(1)

    Message from the stdout of Maxima\: Welcome to LDB, a low\-level debugger for the Lisp runtime environment.
    \(GC in progress\)
    ldb\>
    Message from maxima's stderr stream: Heap exhausted during garbage collection: 0 bytes available, 16 requested.
    Gen Boxed Cons Raw Code SmMix Mixed LgRaw LgCode LgMix Pin Alloc Waste Trig Dirty GCs Mem-age

      補足日時:2024/02/16 23:32
  • 1 0 9107 0 0 0 3 0 0 0 29 295951904 2564576 122551952 291520 1 0.9046
    2 0 24733 0 0 0 2 0 0 0 58 804035088 6481392 366376688 278112 1 1.0782
    3 16 28191 36 7 20 13 0 0 0 139 919081520 7695824 2000000 4065 0 0.4606

      補足日時:2024/02/16 23:34
  • 4 0 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
    5 0 0 0 0 0 0 0 0 0 0 0 0 2000000 0 0 0.0000
    6 469 185 291 708 102 20 35 0 62 0 60322944 1018752 2000000 535 0 0.0000

      補足日時:2024/02/16 23:35
  • Total bytes allocated = 2079391456
    Dynamic-space-size bytes = 2097152000
    GC control variables:
    *GC-INHIBIT* = true
    *GC-PENDING* = true
    *STOP-FOR-GC-PENDING* = false
    fatal error encountered in SBCL pid 1867624956:
    Heap exhausted, game over.

      補足日時:2024/02/16 23:35

A 回答 (3件)

素直に受けとるとメモリを増せということだと思う。

    • good
    • 0

ご承知かとは思うけれども、MaximaはLisp上で動くアプリケーションプログラム。

Lispが約2 Gbyteのメモリを使っているんだけれども、不要になったメモリを回収する処理(garbage collection)の途中でheapが足りなくなっちゃった、と言っている。で、manualは
97.1.11 Out of memory
Lisp typically handles several types of memory containing at least one stack and a heap that contains user objects. To avoid running out of memory several approaches might be useful:
• If possible, the best solution normally is to use an algorithm that is more memory-efficient.
• Compiling a function might drastically reduce the amount of memory it needs.
• Arrays of a fixed type might be more memory-efficient than lists.
• If maxima is run by sbcl sbcl’s memory limit might be set to a value that is too low to solve the current problem. In this case the command-line option --dynamic-space-size <n> allows to tell sbcl to reserve n megabytes for the heap. It is to note, though, that sbcl has to handle several distinct types of memory and therefore might be able to only reserve about half of the available physical memory. Also note that 32-bit processes might only be able to access 2GB of physical memory.
と言っている。
    • good
    • 0

Maximaは使ったことないですが調べると、


ALLOC(4);
とするとメモリが増やせるようです。 https://detail.chiebukuro.yahoo.co.jp/qa/questio …
    • good
    • 1

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!

このQ&Aを見た人はこんなQ&Aも見ています


このQ&Aを見た人がよく見るQ&A