public void checkIsAllocated(){
  int originalBits=AddressableMemoryManager.readIntVolatile(this.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));
  }
}

public void checkIsAllocated ( ) { int originalBits = AddressableMemoryManager . readIntVolatile ( this . 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 ) ) ; } }
throw an exception if this chunk is not allocated
