Skip to content

Commit 6439955

Browse files
authored
Update the default free memory pointer in Yul.rst
The solidity docs and [Inline assembly memory management](https://docs.soliditylang.org/en/v0.8.15/assembly.html#memory-management) suggest the actual allocate-able memory starts from `0x80`. The above yul example defaults the free memory pointer to `0x60` in initialisation cases.
1 parent 6b60524 commit 6439955

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/yul.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ An example Yul Object is shown below:
11621162
code {
11631163
function allocate(size) -> ptr {
11641164
ptr := mload(0x40)
1165-
if iszero(ptr) { ptr := 0x60 }
1165+
if iszero(ptr) { ptr := 0x80 }
11661166
mstore(0x40, add(ptr, size))
11671167
}
11681168

0 commit comments

Comments
 (0)