Skip to content

Commit 1aae8bb

Browse files
ernestognwAmxx
andauthored
Update docs/modules/ROOT/pages/utilities.adoc
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
1 parent a7e61c3 commit 1aae8bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/modules/ROOT/pages/utilities.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,6 @@ function callFoo(address target) internal {
417417
}
418418
----
419419

420-
In this way, new memory will be allocated in the space where the `returndata` and `callData` used to be, potentially reducing memory expansion costs by shrinking the its size at the end of the transaction and resulting in gas savings.
420+
This way, memory is allocated to accommodate the `callData`, and the `returndata` is freed. This allows other memory operations to reuse that space, thus reducing the memory expansion costs of these operations. In particular, this allows many `callFoo` to be performed in a loop with limited memory expansion costs.
421421

422422
IMPORTANT: By default, Solidity handles memory safely. Using this library without understanding how memory works may be dangerous. Consider thoroughly reading the Solidity documentation about the https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_memory.html[memory layout] and how the language defines https://docs.soliditylang.org/en/v0.8.20/assembly.html#memory-safety[memory safety].

0 commit comments

Comments
 (0)