Can anyone tell me How to find out the amount of memory that GC has freed up in an application until now?
Can anyone tell me How to find out the amount of memory that GC has freed up in an application until now?
The GarbageCollectorMXBean exposes garbage collector information, but only the number of collection runs and total time, and no information of the number of objects collected or memory freed.
So from the standard API, there's no way to get this information.
I assume that this would actually be quite an overhead for any garbage collector implementation to compute the actually freed size, so I doubt that this information can be obtained even from the actual GC implementations.