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:
Pranay 2022-08-10 13:54:02 +05:30 committed by GitHub
parent 6b60524cfe
commit 6439955e83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))
}