public static long sizeOf(byte[] b) {
    return memoryLayout.sizeOfByteArray(b.length);
  }
Calculate the memory consumption (in byte) of a byte array, including the array header and the
whole backing byte array. If the whole byte array is occupied (not shared with other objects),
please use this function. If not, please use {@link #sizeOfByteArray(int)} instead.
@param b the byte array
@return the memory consumption (in byte) of the whole byte array
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java