public void setSerialized(boolean isSerialized) {
    if (isSerialized) {
      int bits;
      int originalBits;
      do {
        originalBits =
            AddressableMemoryManager.readIntVolatile(memoryAddress + REF_COUNT_OFFSET);
        if ((originalBits & MAGIC_MASK) != MAGIC_NUMBER) {
          throw new IllegalStateException(
              "It looks like this off heap memory was already freed. rawBits="
                  + Integer.toHexString(originalBits));
        }
        bits = originalBits | IS_SERIALIZED_BIT;
      } while (!AddressableMemoryManager.writeIntVolatile(memoryAddress + REF_COUNT_OFFSET,
          originalBits, bits));
    }
  }
Validates that the fill pattern for this chunk has not been disturbed. This method assumes the
TINY_MULTIPLE is 8 bytes.

@throws IllegalStateException when the pattern has been violated.
geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapStoredObject.java