From: Raymond T. <toy...@gm...> - 2018-04-24 15:52:35
|
>>>>> "Gunter" == Gunter Königsmann <gu...@pe...> writes: Gunter> Potential solution since with Gunter> https://gitlab.gnome.org/GNOME/gnome-shell/issues/64 a maybe similar Gunter> issue has hit the press: Gunter> Would it be reasonable to manually trigger the garbage collector Gunter> - after executing a maxima command in cl-user::run () and Gunter> - after running a testbench file Gunter> - after each read_nested_list() and read_matrix() ? Does any othe lisp require such GC hacks? I'm ok with providing hints to the underlying GC about how maxima uses memory (how many generations there are, how often to collect each generation, how big each generation can be before GC and so on), but I'm not really fond of manually calling GC at random places. It's just so, umm, random. Gunter> This way we only trigger the garbage collector Gunter> - if we loaded something potentially big (which doesn't happen too often) Gunter> - and after a user-interaction. Garbage-collecting 10000 times in a Gunter> long maktelist tends to use much memory. But garbage-collecting once If GC wants to collect 10000 times during makelist, there's a reason for it: memory is low. Delaying GC until after very likely means you'll run out of memory and can't finish makelist. Gunter> after outputting maxima's output but before issuing the user prompt Gunter> should efficiently protect against fragmentation. File bugs with the implementation that GC is behaving badly with maxima. Everybody wins. -- Ray |