Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © 1999 Citrix Systems Inc Using type information in garbage collection Tim Harris.

Similar presentations


Presentation on theme: "1 © 1999 Citrix Systems Inc Using type information in garbage collection Tim Harris."— Presentation transcript:

1 1 © 1999 Citrix Systems Inc Using type information in garbage collection Tim Harris

2 2 © 1999 Citrix Systems Inc Traditional heap organization Registers Stack Heap

3 3 © 1999 Citrix Systems Inc Baker’s treadmill collector

4 4 © 1999 Citrix Systems Inc Problem : reclamation is very bursty Time Heap size The whole heap has to be checked before any storage can be reclaimed.

5 5 © 1999 Citrix Systems Inc Generational collection Idea: separate newly created objects Evidence that they are likely to soon become garbage Scan and reclaim space used by new objects without examining the entire heap How are references from old to new objects handled? When does an object become ‘old’? How else could the heap be divided?

6 6 © 1999 Citrix Systems Inc Alternative : use type information Registers Stack

7 7 © 1999 Citrix Systems Inc Potential benefits Some storage can be reclaimed after each section of the heap has been scanned Different sections can be scanned with different algorithms and maybe concurrently by different threads Some sections can be scanned more frequently than others

8 8 © 1999 Citrix Systems Inc Segregating the heap - example 1

9 9 © 1999 Citrix Systems Inc Segregating the heap - example 2

10 10 © 1999 Citrix Systems Inc Segregating the heap - example 3

11 11 © 1999 Citrix Systems Inc Implementation

12 12 © 1999 Citrix Systems Inc Results - Delta Blue

13 13 © 1999 Citrix Systems Inc Results - Jar

14 14 © 1999 Citrix Systems Inc Results - Javac

15 15 © 1999 Citrix Systems Inc Remaining problems Can new class definitions be handled efficiently at run-time? Can the classes for non-trivial applications be effectively divided into these sections? How is the success of the approach affected by different programming styles?

16 16 © 1999 Citrix Systems Inc Native-code compiler - original

17 17 © 1999 Citrix Systems Inc Native-code compiler - revised

18 18 © 1999 Citrix Systems Inc Future work: parametric polymorphism How are ‘generic’ references handled? public class List { Object data; List next; } public class List { T data; List next; }


Download ppt "1 © 1999 Citrix Systems Inc Using type information in garbage collection Tim Harris."

Similar presentations


Ads by Google