Here you can find the source of alignSize(long size)
protected static final long alignSize(long size)
//package com.java2s; //License from project: Apache License public class Main { /** The number of bytes used to represent an object (with no fields). */ public static final int SIZE_OF_OBJECT_INSTANCE = 8; protected static final long alignSize(long size) { long i = size % SIZE_OF_OBJECT_INSTANCE; if (i == 0) { return size; }//from w w w . j a va 2 s . c o m return size + SIZE_OF_OBJECT_INSTANCE - i; } }