File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
test/hotspot/jtreg/vmTestbase/nsk/share/gc Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2005, 2018 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2005, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -150,12 +150,9 @@ public static int getReferenceObjectSize() {
150150 * @return length of array
151151 */
152152 public static int getArrayLength (long memory , long objectSize ) {
153- int referenceSize = getReferenceSize ();
154153 int arrayExtraSize = getArrayExtraSize ();
155- return (int ) Math .min (
156- (memory - arrayExtraSize ) / (objectSize + referenceSize ),
157- Integer .MAX_VALUE
158- );
154+ return (int ) Math .min ((memory - arrayExtraSize ) / objectSize ,
155+ Integer .MAX_VALUE );
159156 }
160157
161158 /**
@@ -166,7 +163,7 @@ public static int getArrayLength(long memory, long objectSize) {
166163 * @return size of array
167164 */
168165 public static long getArraySize (int length , long objectSize ) {
169- return getObjectExtraSize () + length * ( objectSize + getReferenceSize ()) ;
166+ return getArrayExtraSize () + length * objectSize ;
170167 }
171168
172169 /**
You can’t perform that action at this time.
0 commit comments