public int getMemorySize() {
    m_readLock.lock();

    int size = 0;

    for (final MemoryChunk chunk : m_chunks) {
      size += chunk.getLength();
    }

    m_readLock.unlock();

    return size;
  }
Returns the total size of the simulated memory.

@return The total size of the simulated memory.
java/zylib/src/main/java/com/google/security/zynamics/zylib/general/memmanager/Memory.java