@Override
  public int entrySize(Object key, Object value) {

    if (value == Token.TOMBSTONE) {
      return 0;
    }

    int size = 0;
    int keySize = 0;
    if (!isOffHeap) {
      size += getPerEntryOverhead();
      keySize = sizeof(key);
    }
    int valueSize = sizeof(value);
    size += keySize;
    size += valueSize;
    return size;
  }
compute the size of storing a key/value pair in the cache..
geode-core/src/main/java/org/apache/geode/internal/cache/eviction/MemoryLRUController.java