Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #168172
| Path | csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Po Lu <luangruo@yahoo.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: _Alignof structs |
| Date | Mon, 14 Nov 2022 10:28:39 +0800 |
| Organization | A noiseless patient Spider |
| Lines | 9 |
| Message-ID | <87tu32i814.fsf@yahoo.com> (permalink) |
| References | <2aa493b5-e975-42f8-bc98-f35a7f797159n@googlegroups.com> <tkn3i0$13e3m$1@dont-email.me> <5ee95e61-ccca-4863-af55-c04973ccfac3n@googlegroups.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | reader01.eternal-september.org; posting-host="c203b5ac88c11ffc5757b75a3ae68035"; logging-data="1672365"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FQiS0lrATRHGqfxApq1XB4MvLU/Lrc/A=" |
| User-Agent | Gnus/5.13 (Gnus v5.13) |
| Cancel-Lock | sha1:CHJE2cloFo/JAi99ZGe5cLLVo+A= sha1:xfCNgFt1u6VIthqMY26GdjbgolU= |
| Xref | csiph.com comp.lang.c:168172 |
Show key headers only | View raw
Thiago Adams <thiago.adams@gmail.com> writes: > Yes. the same aligment returned by malloc. Then you have to define a union of every built-in type, and take the alignment of that union. malloc does not know what type it is allocating memory for, so it returns memory suitably aligned for *all* built-in types.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
_Alignof structs Thiago Adams <thiago.adams@gmail.com> - 2022-11-10 10:50 -0800
Re: _Alignof structs Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-11-10 11:56 -0800
Re: _Alignof structs Thiago Adams <thiago.adams@gmail.com> - 2022-11-11 02:57 -0800
Re: _Alignof structs Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-11-11 15:07 -0800
Re: _Alignof structs Thiago Adams <thiago.adams@gmail.com> - 2022-11-11 18:08 -0800
Re: _Alignof structs Richard Damon <Richard@Damon-Family.org> - 2022-11-11 22:09 -0500
Re: _Alignof structs Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-11-11 19:22 -0800
Re: _Alignof structs Thiago Adams <thiago.adams@gmail.com> - 2022-11-12 02:53 -0800
Re: _Alignof structs Po Lu <luangruo@yahoo.com> - 2022-11-14 10:28 +0800
Re: _Alignof structs Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-11-14 02:44 +0000
Re: _Alignof structs "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-11-13 18:44 -0800
csiph-web