diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-12 06:41:37 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-12 16:15:06 +0800 |
commit | 3d12c2ddc72d15dfcf599a089f104a2a5c224f41 (patch) | |
tree | c84449f52d6bc7780b841d9d3ae8aa67606563da /docs/introduction-to-smart-contracts.rst | |
parent | f0524ed45a407ff9b1b59ee04edbfb9489a4f8a1 (diff) | |
download | dexon-solidity-3d12c2ddc72d15dfcf599a089f104a2a5c224f41.tar dexon-solidity-3d12c2ddc72d15dfcf599a089f104a2a5c224f41.tar.gz dexon-solidity-3d12c2ddc72d15dfcf599a089f104a2a5c224f41.tar.bz2 dexon-solidity-3d12c2ddc72d15dfcf599a089f104a2a5c224f41.tar.lz dexon-solidity-3d12c2ddc72d15dfcf599a089f104a2a5c224f41.tar.xz dexon-solidity-3d12c2ddc72d15dfcf599a089f104a2a5c224f41.tar.zst dexon-solidity-3d12c2ddc72d15dfcf599a089f104a2a5c224f41.zip |
Merge the two EVM memory introduction sections
Diffstat (limited to 'docs/introduction-to-smart-contracts.rst')
-rw-r--r-- | docs/introduction-to-smart-contracts.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst index 922056ec..bfc342d9 100644 --- a/docs/introduction-to-smart-contracts.rst +++ b/docs/introduction-to-smart-contracts.rst @@ -348,9 +348,11 @@ storage. A contract can neither read nor write to any storage apart from its own. The second memory area is called **memory**, of which a contract obtains -a freshly cleared instance for each message call. Memory can be -addressed at byte level, but read and written to in 32 byte (256-bit) -chunks. Memory is more costly the larger it grows (it scales +a freshly cleared instance for each message call. Memory is linear and can be +addressed at byte level, but reads are limited to a width of 256 bits, while writes +can be either 8 bits or 256 bits wide. Memory is expanded by accessing (either +reading or writing) a previously untouched memory offset. At the time of expansion, +the cost in gas must be paid. Memory is more costly the larger it grows (it scales quadratically). The EVM is not a register machine but a stack machine, so all |