Sujet : Re: C23 thoughts and opinions
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.lang.cDate : 24. May 2024, 19:21:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v2qlqu$2egjm$2@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
On 5/24/2024 11:08 AM, Chris M. Thomasson wrote:
[...]
Fwiw, here is an older region allocator that is meant to use a threads stack space. It not one of my lock-free ones but:
https://pastebin.com/raw/f37a23918(raw text, no ads and shit like that...)
This old code uses some old alignment hacks!
#define RALLOC_ALIGN_OF(mp_type) \
offsetof( \
struct { \
char pad_RALLOC_ALIGN_OF; \
mp_type type_RALLOC_ALIGN_OF; \
}, \
type_RALLOC_ALIGN_OF \
)
Yikes!