Article View: comp.lang.c
Article #345Re: AVL tree insertion - programming exercise
From: Scott Lurndal
Date: Tue, 13 Oct 2026 17:15
Date: Tue, 13 Oct 2026 17:15
24 lines
1999 bytes
1999 bytes
cross@spitfire.i.gajendra.net (Dan Cross) writes: >In article <11al4mu$fqtl$1@kst.eternal-september.org>, >Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote: > >I argue that examining the text from C17 and how it has changed >further supports this interpretation. From C17, sec 7.22.3: > >|The pointer returned if the allocation succeeds is suitably >|aligned so that it may be assigned to a pointer to any type of >|object with a fundamental alignment requirement and then used >|to access such an object or an array of such objects in the >|space allocated (until the space is explicitly deallocated). > >Here, no mention of the requested size is made at all, and this >clearly requires the return value from a successful allocation >by `malloc(1)` to be aligned so that one could assign it to a >pointer referring to any object of any type with a "fundamental >alignment requirement." Note that the processor ABI documents for x86_64 and arm64 also require the return value always be aligned congruent to zero module 16.
Technical Details
Message-ID:
<fHtzS.249963$iAH2.193623@fx14.iad>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer04.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mailReferences:
<86ece2kppv.fsf@linuxsc.com> <11akqm4$c6h9$1@dont-email.me> <11akuf1$bq6c$1@dont-email.me> <11al4mu$fqtl$1@kst.eternal-september.org> <11ali2e$pi$1@reader2.panix.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer04.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail X-newsreader: xrn 9.03-beta-14-64bit Sender: scott@dragon.sl.home (Scott Lurndal) From: scott@slp53.sl.home (Scott Lurndal) Reply-To: slp53@pacbell.net Subject: Re: AVL tree insertion - programming exercise Newsgroups: comp.lang.c References: <86ece2kppv.fsf@linuxsc.com> <11akqm4$c6h9$1@dont-email.me> <11akuf1$bq6c$1@dont-email.me> <11al4mu$fqtl$1@kst.eternal-september.org> <11ali2e$pi$1@reader2.panix.com> Lines: 24 Message-ID: <fHtzS.249963$iAH2.193623@fx14.iad> X-Complaints-To: abuse@usenetserver.com NNTP-Posting-Date: Tue, 13 Oct 2026 17:15:55 UTC Organization: UsenetServer - www.usenetserver.com Date: Tue, 13 Oct 2026 17:15:55 GMT X-Received-Bytes: 1765