public Bytes getBytesWithoutGrowth(final long location, final long numBytes) {
    // Note: if length == 0, we don't require any memory expansion, whatever location is. So
    // we must call asByteIndex(location) after this check so as it doesn't throw if the location
    // is too big but the length is 0 (which is somewhat nonsensical, but is exercise by some
    // tests).
    final int length = asByteLength(numBytes);
    if (length == 0) {
      return Bytes.EMPTY;
    }

    final int start = asByteIndex(location);

    // Arrays.copyOfRange would throw if start > memBytes.length, so just return the expected
    // number of zeros without expanding the memory.
    // Otherwise, just follow the happy path.
    if (start > memBytes.length) {
      return Bytes.wrap(new byte[(int) numBytes]);
    } else {
      return Bytes.wrap(Arrays.copyOfRange(memBytes, start, start + length));
    }
  }
Returns a copy of bytes by peeking into memory without expanding the active words.

@param location The location in memory to start with.
@param numBytes The number of bytes to get.
@return A fresh copy of the bytes from memory starting at {@code location} and extending {@code
    numBytes}.
evm/src/main/java/org/hyperledger/besu/evm/frame/Memory.java