Hooks for generation survivors

25 views
Skip to first unread message

Jon Harrop

unread,
Jan 20, 2014, 8:39:59 AM1/20/14
to pragmatic-functional...@googlegroups.com

 

Garbage collectors usually expose the ability to invoke a garbage collection, control the parameters of the GC and to check which generation an object is in.

 

It occurs to me that another useful feature would be the ability to redefine the function used to copy an object from one generation to another. For example, a binary search tree that survives the nursery generation could be morphed into a sorted array for the old generation. Given that the binary search tree has survived it is unlikely to die soon so it would make sense to coalesce the subgraph into a single heap-allocated block.

 

--

Dr Jon Harrop, Flying Frog Consultancy Ltd.

http://www.ffconsultancy.com

Reply all
Reply to author
Forward
0 new messages