public long memoryByteSize() {
    return memory.getActiveBytes();
  }
Returns the number of bytes in memory.

@return the number of bytes in memory
evm/src/main/java/org/hyperledger/besu/evm/frame/MessageFrame.java