Attempting to fix TestHeapSize on Hudson (align array heapsize)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1001944 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Gray 2010-09-27 22:43:59 +00:00
parent 9069ed1ac6
commit 4f545ea09c
2 changed files with 4 additions and 3 deletions

View File

@ -1930,9 +1930,10 @@ public class KeyValue implements Writable, HeapSize {
// HeapSize
public long heapSize() {
return ClassSize.align(ClassSize.OBJECT + (2 * ClassSize.REFERENCE) +
ClassSize.align(ClassSize.ARRAY + length) +
ClassSize.align(ClassSize.ARRAY) + ClassSize.align(length) +
(3 * Bytes.SIZEOF_INT) +
ClassSize.align(ClassSize.ARRAY + (rowCache == null ? 0 : rowCache.length)) +
ClassSize.align(ClassSize.ARRAY) +
ClassSize.align((rowCache == null ? 0 : rowCache.length)) +
(2 * Bytes.SIZEOF_LONG));
}

View File

@ -118,7 +118,7 @@ public class ClassSize {
OBJECT = 2 * REFERENCE;
ARRAY = 3 * REFERENCE;
ARRAY = align(3 * REFERENCE);
ARRAYLIST = align(OBJECT + align(REFERENCE) + align(ARRAY) +
(2 * Bytes.SIZEOF_INT));