aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-10-12 06:51:09 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-10-12 16:15:06 +0800
commit66c6c746998b853cde52225ce73818b5496c79c5 (patch)
treede5616ac5643bb7b3aa965f35dfd829a74f55c6b /docs
parent3d12c2ddc72d15dfcf599a089f104a2a5c224f41 (diff)
downloaddexon-solidity-66c6c746998b853cde52225ce73818b5496c79c5.tar
dexon-solidity-66c6c746998b853cde52225ce73818b5496c79c5.tar.gz
dexon-solidity-66c6c746998b853cde52225ce73818b5496c79c5.tar.bz2
dexon-solidity-66c6c746998b853cde52225ce73818b5496c79c5.tar.lz
dexon-solidity-66c6c746998b853cde52225ce73818b5496c79c5.tar.xz
dexon-solidity-66c6c746998b853cde52225ce73818b5496c79c5.tar.zst
dexon-solidity-66c6c746998b853cde52225ce73818b5496c79c5.zip
Explain how scratch space affects the free memory pointer
Diffstat (limited to 'docs')
-rw-r--r--docs/miscellaneous.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst
index 47da33b8..b631a2e4 100644
--- a/docs/miscellaneous.rst
+++ b/docs/miscellaneous.rst
@@ -64,7 +64,12 @@ Solidity reserves three 256-bit slots:
- 0 - 64: scratch space for hashing methods
- 64 - 96: currently allocated memory size (aka. free memory pointer)
-Solidity always places new objects at the free memory pointer and memory is never freed.
+Scratch space can be used between statements (ie. within inline assembly).
+
+Solidity always places new objects at the free memory pointer and memory is never freed (this might change in the future).
+
+.. warning::
+ There are some operations in Solidity that need a temporary memory area larger than 64 bytes and therefore will not fit into the scratch space. They will be placed where the free memory points to, but given their short lifecycle, the pointer is not updated. The memory may or may not be zeroed out. Because of this, one shouldn't expect the free memory to be zeroed out.
.. index: memory layout