|
From: Nikodemus S. <nik...@ra...> - 2010-02-27 16:04:28
|
On 27 February 2010 16:46, Brett van de Sande <bv...@as...> wrote: > If I recompile with a larger value of gencgc-page-bytes, as suggested > then gc overall becomes *much* slower. What about adjusting the max_map_count? > What about doing a gc that only does generation 5? > That is, put a switch in garbage_collect so that, if desired, it only > calls garbage_collect_generation(5,0) The way the GC works is that you cannot collect generation N+1 unless generation N is empty -- so no. This is a fairly fundamental assumption in the system. > OK, I understand that there is no lisp version of free(). > However, would it help the garbage collection if I applied > something like the following to my session data at the close > of a session: > > (defun dereference (obj) > (cond ((consp obj) > (dereference (car obj)) > (dereference (cdr obj)) > (setf (car obj) nil) > (setf (cdr ojb) nil)) > ;; add similar actions for arrays, structs, etc. > )) To a degree, yes. Doing it always for everything is almost certainly a bad idea, but doing things like CLRHASH for hash-tables or FILL for vectors can be worthwhile. It all depends: if cleaning out pointers means you're writing to write-protected pages it is going to be a loss -- but if those pages are dirty already, it is probably a win. Cheers, -- Nikodemus |