@Override
  public int getLocalMaxMemory() {
    if (offHeap && !localMaxMemoryExists) {
      int value = computeOffHeapLocalMaxMemory();
      if (localMaxMemoryExists) {
        // real value now exists so set it and return
        localMaxMemory = value;
      }
    }
    checkLocalMaxMemoryExists();
    return localMaxMemory;
  }
Returns localMaxMemory that must not be a temporary placeholder for offHeapLocalMaxMemory if
off-heap. This must return the true final value of localMaxMemory which requires the
DistributedSystem to be created if off-heap. See bug #52003.

@throws IllegalStateException if off-heap and the actual value is not yet known (because the
        DistributedSystem has not yet been created)
@see #getLocalMaxMemoryForValidation()
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionAttributesImpl.java