Garbage collector root finder

OData support
Dr. Lengyel László
Department of Automation and Applied Informatics

Java virtual machine or shortly JVM is supported with a built-in garbage collection tool. The garbage collection is an automatic process to manage memory resources. When a Java program runs, it creates objects in the heap memory which is a part of the memory dedicated to the application. While the program is running there will be unused objects and the garbage collection process will constantly delete these objects to free up the memory. The garbage collector does its work in many phases to mark the live objects then delete the dead ones. This process works perfectly in most of the cases. But in some cases, we face an issue when the memory is consumed and there is no free space, this issue is common with the name “out of memory exception” or “memory leak”. It happens when the garbage collector unable to delete the dead objects because it is still reachable from a live object. In such cases, we need to show and analyze the heap memory to detect why some objects remain in memory.

The existence of a memory leak in an application costs time and effort for the programmers because it prevents the program to run over time and effects the other program and applications. The thesis work provides a study for the causes of memory leak and provides a web solution to show and analyze the heap memory. The main goal includes reading the heap memory snapshot, analyze the data to preview it in a structural way as web pages and provide automation and query tools to detect the memory leak.

Garbage collector root finder is a practical and industrial application. The application is done with the collaboration with Atrido company. The purpose of the thesis work is to study the Hprof file structure in order to build an application able to read the file and generate classes and object reflect its records. Explore the relationships between classes and expect the GC root for any instance. There are a couple of other applications do the same purpose as Java VisualVM. The main difference is, the current study generates a website then the application can be used online. Also, the application deal with the Hprof file’s size of more than 4 GB. Which is not available with other application. The application increases the space utilization by using classes like directMemory to improve the I/O access time and decrease the size needed to read the file. The last thing, the application read only IDs from the file and try to reduce the size of data saved until the user ask for it to reduce the data needed.


Please sign in to download the files of this thesis.