Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: John Ames Newsgroups: comp.os.linux.misc Subject: Re: VMS Date: Wed, 23 Jul 2025 14:28:45 -0700 Organization: A noiseless patient Spider Lines: 14 Message-ID: <20250723142845.000033ee@gmail.com> References: <20250625093213.00002ec2@gmail.com> <20250625094418.00007fd2@gmail.com> <105iv02$3cuhr$2@dont-email.me> <20250721091242.00007573@gmail.com> <20250721133148.00007cc6@gmail.com> <105pv2t$77mv$1@dont-email.me> <20250723080407.00004a8a@gmail.com> <105ri4r$ed5t$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Wed, 23 Jul 2025 23:28:50 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d1fddc984b9daff4cec7569e2db0c386"; logging-data="1163027"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HEkBjLPyWDf5tQk0NP4/N+NrnL5gmI0U=" Cancel-Lock: sha1:smLBd8vYEfKP8Ds/1VdXd3rLeD4= X-Newsreader: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Xref: csiph.com comp.os.linux.misc:69860 On Wed, 23 Jul 2025 21:53:47 +0100 Pancho wrote: > If n is small, it probably isn't worth the time thinking about it, so > you just allocate n^2 elements. There is nothing superstitious or > dangerous about this. It just recognises that the extra coding time > is not worth the memory cost. That's fair enough - but it's also not what was being discussed. This branch of the discussion started off, specifically, with the suggestion that allocating extra was a helpful ward against running off the end of a buffer/array and stomping on the next allocation, which it really, really isn't.