Skip to content

compiler: add RETURNS_UNALIASED macro for malloc-like functions#122

Open
whitslack wants to merge 2 commits into
rustyrussell:masterfrom
whitslack:compiler/attribute-malloc
Open

compiler: add RETURNS_UNALIASED macro for malloc-like functions#122
whitslack wants to merge 2 commits into
rustyrussell:masterfrom
whitslack:compiler/attribute-malloc

Conversation

@whitslack

Copy link
Copy Markdown
Contributor

This affords the optimizer the opportunity to assume that writes through the returned pointer cannot modify memory accessible via any other pointer and vice versa.

Then mark tal_alloc_() and tal_alloc_arr_() as RETURNS_UNALIASED.

This affords the optimizer the opportunity to assume that writes through the
returned pointer cannot modify memory accessible via any other pointer and
vice versa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant