hotspot/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java
changeset 38133 78b95467b9f1
parent 36851 03e2f4d0a421
child 40059 c2304140ed64
--- a/hotspot/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java	Mon Apr 25 21:25:22 2016 +0300
+++ b/hotspot/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java	Tue Apr 26 10:28:51 2016 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -84,7 +84,7 @@
             Asserts.assertEQ(initialUsage, 0L, "Unexpected initial usage");
         }
         ArrayList<Long> blobs = new ArrayList<>();
-        long minAllocationUnit = CodeCacheUtils.MIN_ALLOCATION - headerSize;
+        long minAllocationUnit = Math.max(0, CodeCacheUtils.MIN_ALLOCATION - headerSize);
         /* now filling code cache with large-sized allocation first, since
          lots of small allocations takes too much time, so, just a small
          optimization */