public static int getByteSize(byte[] serializedValue) {
    // add 4 for the length field of the byte[]
    return serializedValue.length + Sizeable.PER_OBJECT_OVERHEAD + 4;
  }
Return the number of bytes the specified byte array will consume of heap memory.
geode-core/src/main/java/org/apache/geode/internal/cache/CachedDeserializableFactory.java