Java
229 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Garbage Collection Conceptshistorical
Object reclamation can use approaches such as reference counting or reachability. These notes begin with counters and examine circular-reference problems.
- 7.4 Class Lifecyclehistorical
Java classes pass through loading, linking, initialization, use, and unloading. These notes organize the work performed at each stage.
- 7.5 Memory Regionshistorical
The JVM uses runtime memory areas for objects and other data. These notes begin with the heap and examine each area's role and creation timing.
- 7.6 Tuning Approachhistorical
Tuning Approach: Reduce the number of Full GCs / reduce Full GC duration / reduce memory usage.
- Garbage Collection Algorithmshistorical
Garbage collection identifies reachable objects and handles those no longer used. These notes organize algorithms around marking and reclamation.
- Class Initialization Orderhistorical
Active use can trigger Java class initialization, including prior parent-class initialization. These notes use code examples to examine class and instance initialization order.
- 7.9 Object Allocation Ruleshistorical
Object Allocation Rules: Objects are preferentially allocated in the Eden area. If there is not enough space in Eden, the virtual machine performs a Minor GC.
- 7.10 3. Garbage Collectorshistorical
Objects have different lifetimes, motivating generational memory organization and collection. These notes compare collectors through young- and old-generation characteristics.
- Custom Class Loaderhistorical
Custom class loaders can load classes from selected paths and isolate same-named classes in different applications. These notes examine implementations through those scenarios.
- Escape Analysishistorical
Escape analysis examines an object's scope and whether code outside a method or thread can access it. These notes organize cases such as method escape.