From: Josef W. <jw...@ra...> - 2014-03-14 10:10:17
|
On Tue, Mar 11, 2014 at 04:36:37PM +0100, Andreas Franke wrote: > On Tue, Mar 11, 2014 at 10:25 AM, Josef Wolf <jw...@ra...> wrote: > The heap objects are partitioned in generations 0 ... 6 > where generation 6 is static, and generation 5 is the highest > generation where objects are moved to. Watch the logs: > (setf (gc-logfile) "/tmp/gc-log.txt") > > A useful strategy might be to > 1) allocate your "permanent" data structures, > 2) perform (gc :full t) to make sure the are moved to generation 5. > 3) prune the number of generations looked at by gc, for example: > > (in-package :cl-user) > (define-alien-variable gencgc-oldest-gen-to-gc (signed 8)) > (setf gencgc-oldest-gen-to-gc 2) > > 4) and then tune the gc parameters experimentally: > (setf (sb-ext:bytes-consed-between-gcs) ...) > and for 0 <= k < (1- gencgc-oldest-gen-to-gc): > (setf (sb-ext:generation-minimum-age-before-gc k) ...) > (setf (sb-ext:generation-number-of-gcs-before-promotion k) ...) > and make sure gc is called often enough. Thanks, I'll give it a try! > Note that during gc all threads are stopped completely. But that should not apply to threads created from C, since CL should not know anything about them, right? -- Josef Wolf jw...@ra... |