On Nov 28, 2010, at 20:40 , Jon Harrop wrote:

> I don’t understand why this would help here though. Wouldn’t that help when a 
> long-lived structure was single large block but, in this case, the long-lived 
> structure is a tree composed of many small heap-allocated blocks and, 
> therefore, they would undergo the same wasteful “allocate in young only to be 
> copied to old” pathological behaviour?

There is no "young" and no "old" in this scheme. There are two different heaps, 
one for large objects, one for small (probably 2-8k max object size, so not 
really small in the sense of OCaml). The small area is managed by Immix, which 
avoids copying of long-lived objects if they are allocated together with other 
long-lived objects (likely), or if not evacuates a set of probably related 
objects to a single chunk (this is somewhat dependent on the evacuation 
strategy, which will be differnt for OCaml compared to Java), further improving 
locality. There are simple heuristics to ensure that an object is not evacuated 
too often (it is already unlikely with the base algorithm), so there will be a 
lot less copying. One difficulty remains however: the pause times. It would 
probably be necessary to adopt Immix to a (semi-)incremental style to get the 
same pause times as with the current GC.

Benedikt
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to