As we know the java's garbage collector is a low priority thread. And in java we can create any thread with high priority. So is it possible to have our own customized garbage collector thread with variable priority (we can set depending on the level of memory management).
Did anybody tried that. If yes can you share some knowledge about how and its logic? Thanks
Java's garbage collector isn't "a low priority thread." For example, garbage collection often uses multiple threads in parallel. And, when memory runs low, garbage collection can preempt any application thread.
I recommend studying the Garbage Collection Tuning guide to determine the type of garbage collector best suited to an application, and how to adjust its parameters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With