If you are C/C++ guy and migrated to Java, Java might have impressed you with Garbage Collection. Yes, that is true. Java cleans up your mess automatically but it is your responsibility to show which ones are mess. Even with Java automatic GC still memory leak is possible in Java. Refer "Effective Java" by Joshua Bloch (it is a great book on using Java effectively). Like Linux, Java is also being used from Mobile phones to High end servers. Would you believe, if I say, Java does not have just one garbage collection algorithm but it is a suite of algorithms. Above that, the interesting fact is that, Garbage Collection algorithms are tunable and configurable.
By default, it works in a specific way but it can be changed based on the application requirements during starting up of Java Virtual Machine. We will be discussing Garbage Collection techniques and GC tuning techniques with simple example. In the entire exercise, we will rely on generating GC statistics from the JVM and internalize the Garbage collection.
To understand the next few blogs (I dont know how many blogs that I will write on GC), it is assumed that you know Java. Even if you don't know Java the algorithms will be of interest if you are planning to write memory management module. I bet, you will like the way it is written.
No comments:
Post a Comment