File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
core/src/main/scala/org/apache/spark/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -217,10 +217,10 @@ object SizeEstimator extends Logging {
217217 var arrSize : Long = alignSize(objectSize + INT_SIZE )
218218
219219 if (elementClass.isPrimitive) {
220- arrSize += alignSize(length * primitiveSize(elementClass))
220+ arrSize += alignSize(length.toLong * primitiveSize(elementClass))
221221 state.size += arrSize
222222 } else {
223- arrSize += alignSize(length * pointerSize)
223+ arrSize += alignSize(length.toLong * pointerSize)
224224 state.size += arrSize
225225
226226 if (length <= ARRAY_SIZE_FOR_SAMPLING ) {
@@ -336,7 +336,7 @@ object SizeEstimator extends Logging {
336336 // hg.openjdk.java.net/jdk8/jdk8/hotspot/file/tip/src/share/vm/classfile/classFileParser.cpp
337337 var alignedSize = shellSize
338338 for (size <- fieldSizes if sizeCount(size) > 0 ) {
339- val count = sizeCount(size)
339+ val count = sizeCount(size).toLong
340340 // If there are internal gaps, smaller field can fit in.
341341 alignedSize = math.max(alignedSize, alignSizeUp(shellSize, size) + size * count)
342342 shellSize += size * count
You can’t perform that action at this time.
0 commit comments