1 / 5

Users always get it wrong?

Users always get it wrong?. Explicit MM is a rich source of bugs Dangling pointers Double delete, etc So use Garbage Collection Eliminates these errors (But doesn’t prevent leaks) Supports better software engineering GC gives users little control System.gc() Widely used/advocated

crescent
Download Presentation

Users always get it wrong?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Users always get it wrong? • Explicit MM is a rich source of bugs • Dangling pointers • Double delete, etc • So use Garbage Collection • Eliminates these errors • (But doesn’t prevent leaks) • Supports better software engineering • GC gives users little control • System.gc() • Widely used/advocated • But JVM can ignore it • We GCers know better…? ISMM’04 Wild and Crazy

  2. Allocation control • No need for any handle on allocation policy? • Universal panaceas • Generational GC • Incremental/concurrent GC • Troublesome, middle-aged objects? • But one rule for us, another for them… • Large object spaces • Immortal areaspublicstatic int pickAllocator(VM_Type type, VM_Method m) { VM_Class cls = m.getDeclaringClass();byte[] clsBA = cls.getDescriptor().toByteArray();if (isPrefix("Lorg/mmtk/", clsBA)) return Plan.IMMORTAL_SPACE; MMType t = (MMType) type.getMMType();return t.getAllocator(); // Plan.DEFAULT_SPACE } ISMM’04 Wild and Crazy

  3. Users do know some things r t • Semantics • Phases, Longevity, Connectivity • Lifetime ~ allocation site • Allocation policies • System provided? User-defined? • Safety: Hints not orders • Syntax • Scoped memory? policy.enter(); … policy.exit(); • Marker Interface? class Foo implements PolicyIF {…} • Placement new? Foo^ o = new (policy) Foo(); • Tools • Users need better tools to guide optimisation ISMM’04 Wild and Crazy

  4. ISMM’04 Wild and Crazy

  5. GC bibliography • Proposal: • Anyone who writes a GC-related paper, or who discovers a GC-related paper that is not in • http://www.cs.kent.ac.uk/people/staff/rej/gcbib/ • should send a bibtex entry for the paper to • R.E.Jones@kent.ac.uk • Failure to do so should incur a forfeit of buying Richard Jones a drink at the next ISMM. ISMM’04 Wild and Crazy

More Related