Learning Java garbage collection

 

   Garbage collection, depending on JRE and JVM, involving the operating system memory allocation and recovery. Based on what they have learned, I guess this mechanism requires the data structure is heap memory allocation table (chain), management has been allocated and unallocated heap memory for the allocated heap memory, you need to know which variables are referenced by the stack memory. Knowing this, and detection rely on garbage collection algorithms, the long block of heap memory has not been recovered reference stack variables, linked to the unallocated memory table. Might be defragmented after cleanup is complete, modifies the allocation table.

  Detection and garbage collection algorithms, Java will be as different versions of the operating system is different. And garbage collection algorithms to detect and can be selected manually.

Guess you like

Origin www.cnblogs.com/Luck-365/p/11684733.html