mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Clarify that using msize without updating the free-memory-pointer is a bad idea
This commit is contained in:
parent
4be9dc4304
commit
44f2cfb5ca
@ -79,6 +79,7 @@ Solidity always places new objects at the free memory pointer and memory is neve
|
||||
.. 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.
|
||||
|
||||
While it may seem like a good idea to use ``msize`` to arrive at a definitely zeroed out memory area, using such a pointer non-temporarily without updating the free memory pointer can have adverse results.
|
||||
|
||||
.. index: calldata layout
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user