Re:Arena Allocator Tips and Tricks
by variadix on Thursday September 28, 2023 @11:29AM
(#37691029)
I feel like there should be a builtin that takes a void* and returns a void* which basically marks the input as aliased by the returned pointer regardless of the TBAA rules.
[ Parent
| on HN ]
Turns out there is! __builtin_launder seems mostly equivalent to what the author proposes but probably more reliable. Facebook’s folly library appears to use both, preferring the builtin.