Kathey Marsden wrote:

Also I think I might try to gc() before the measurements and see if that makes a difference, but it seems to me that would only make the value larger.

putting runtime.gc() and runtime.runFinalization() before the calls to totalMemory() and freeMemory() seem to stabilize it at 4.

Does that seem like a reasonable solution? The static block is only called once so it shouldn't impact performance I think.

Kathey


Reply via email to