Closed KamaDeFi closed 2 years ago
Question: why does the memory pointer have to be 32-byte aligned? I ran the code reserving exactly 78+32 bytes str := add(mload(0x40), 0x6C), and the execution of the function cost 3 less gas.
str := add(mload(0x40), 0x6C)
It must be aligned, or else other code that assumes a 32 byte alignment will break.
Question: why does the memory pointer have to be 32-byte aligned? I ran the code reserving exactly 78+32 bytes
str := add(mload(0x40), 0x6C)
, and the execution of the function cost 3 less gas.