🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #319

Re: AVL tree insertion - programming exercise

#319
From: James Kuyper
Date: Tue, 13 Oct 2026 10:20
11 lines
1805 bytes
On 13/10/2026 10:38, chine.bleu wrote:
...> As a precaution check the return
> address of malloc
> 
>      p = malloc(m);
>      if ((uintptr_t)p)&1!=0) abort();
Just to be pedantic, the standard doesn't guarantee that the expression
you use will test what you want to test. Since there is a guarantee that
malloc() returns a universally aligned memory, I think it's actually
more likely that the test will fail than that malloc() will fail, though
both probabilities are quite negligible, so it's hard to be sure.
Technical Details
Message-ID: <11al0l0$eefv$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <86ece2kppv.fsf@linuxsc.com> <11akqm4$c6h9$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: James Kuyper <jameskuyper@alumni.caltech.edu>
Newsgroups: comp.lang.c
Subject: Re: AVL tree insertion - programming exercise
Date: Tue, 13 Oct 2026 06:20:14 -0400
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <11al0l0$eefv$1@dont-email.me>
References: <86ece2kppv.fsf@linuxsc.com> <11akqm4$c6h9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 13 Oct 2026 10:20:17 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="473599"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18tu8IkDYW1KH9vixZXIqjfLaSjyoLU4Xo="; posting-host="8076c133752e2afaf75c8f5891263362"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:hOcJT/SLhmVLiszGET/ZBjtAbic= sha256:y5X0JLcEfxLHqRTn4V7IWUmcCCYr181FW4AubP1FnlE=
	sha1:d7qfezZK7DRDBouHxpaplKK5JYw= sha256:EYPQhASq5Zs+R4is+iduaGxLDcUpMOlPap1cwN1337c=
In-Reply-To: <11akqm4$c6h9$1@dont-email.me>
Content-Language: en-US