memory
Memory Model
Volatile byte-addressable space.
Memory is a temporary, byte-addressable linear space. It is used to store complex data like strings, arrays, or structs during execution. Unlike the stack, you can access any byte in memory at any time. However, memory is volatile—it is wiped clean once execution finishes. Memory expansion has a quadratic gas cost, meaning it gets exponentially more expensive as you use more of it.
Execution Simulation
Assistant Note
"Currently at PUSH instruction. It's going to place a value on top of the stack."
Program
10 bytesStack
LIFO0 / 1024
Memory
0 bytes00-0708-1516-2324-31
Gas Meter
Consumed0 / 1,000,000
Last Op Cost
-0
Refund
0
* Gas prevents infinite loops and DDoS. SSTORE is the most expensive opcode (20,000 gas for new slots).