// Stop the JIT to be sure nothing is running that could be resolving classes or causing // verification.
Main.stopJit();
Main.waitForCompilation();
// Make sure that there is no reclaimable memory in the heap. Otherwise we may throw // OOME to prevent GC thrashing, even if later allocations may succeed.
Runtime.getRuntime().gc();
System.runFinalization(); // NOTE: There is a GC invocation in the exhaustJavaHeap(). So we don't need one here.
int initial_size = 1024 * 1024; // Repeat to ensure there is no space left on the heap.
exhaustJavaHeap(initial_size);
exhaustJavaHeap(/*size*/ 4);
exhaustJavaHeap(/*size*/ 4);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.