Eric Johnson wrote:
I take this documentation from System.gc() at face value:
"When control returns from the method call, the Java Virtual Machine *has* made a best effort to reclaim space from all discarded objects." (emphasis added) - In other words, it is blocking, although "best effort" is not exactly well defined.... I've not really looked on the web, though, to see whether the actual implementation varies.

In practice you can just treat it as non-blocking. Please note that there are several GC implementations that even vary between JDK versions. So the actual behaviour of System.gc() is somewhat undefined and maybe the docs are outdated... This is a very frequent issue when dealing with benchmarks that measure memory footprint.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to