equal
deleted
inserted
replaced
56 = (int) ((AVAILABLE_MEMORY / HUMON_SIZE) |
56 = (int) ((AVAILABLE_MEMORY / HUMON_SIZE) |
57 / LISTS_COUNT); |
57 / LISTS_COUNT); |
58 |
58 |
59 |
59 |
60 public static void main(String[] args) { |
60 public static void main(String[] args) { |
|
61 if (HUMON_COUNT == 0) { |
|
62 System.out.println("Skipped. Heap is too small"); |
|
63 return; |
|
64 } |
61 System.out.format("Running with %s max heap size. " |
65 System.out.format("Running with %s max heap size. " |
62 + "Will allocate humongous object of %s size %d times.%n", |
66 + "Will allocate humongous object of %s size %d times.%n", |
63 MemoryUsagePrinter.humanReadableByteCount(AVAILABLE_MEMORY, false), |
67 MemoryUsagePrinter.humanReadableByteCount(AVAILABLE_MEMORY, false), |
64 MemoryUsagePrinter.humanReadableByteCount(HUMON_SIZE, false), |
68 MemoryUsagePrinter.humanReadableByteCount(HUMON_SIZE, false), |
65 HUMON_COUNT |
69 HUMON_COUNT |