mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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.
This commit is contained in:
parent
6b60524cfe
commit
6439955e83
@ -1162,7 +1162,7 @@ An example Yul Object is shown below:
|
||||
code {
|
||||
function allocate(size) -> ptr {
|
||||
ptr := mload(0x40)
|
||||
if iszero(ptr) { ptr := 0x60 }
|
||||
if iszero(ptr) { ptr := 0x80 }
|
||||
mstore(0x40, add(ptr, size))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user