Article View: comp.lang.c
Article #2241Re: is a wrapper on memory-allocation calls a good idea?
From: Tristan Wibberley
Date: Sat, 05 Dec 2026 08:47
Date: Sat, 05 Dec 2026 08:47
43 lines
3846 bytes
3846 bytes
On 03/12/2026 22:25, Chris M. Thomasson wrote: > On 12/3/2026 2:19 PM, Chris M. Thomasson wrote: >> On 12/3/2026 1:51 PM, Bonita Montero wrote: >>> Am 02.12.2026 um 23:14 schrieb Chris M. Thomasson: >>> >>>> Huh? malloc returns NULL. It can throw in a C++ context for sure. >>>> Still, you don't seem to grasp certain things. Anyway... >>> >>> Are you serious ? Returning an error code is a completely >>> different kind of error handling than an exception. >> >> I know what exceptions are. If malloc returns NULL, a C++ can program >> can decide to throw, or handle the error, whatever. Yes there is >> std::malloc. I know how to use new in all of its forms. >> >> Ever use C++ in a system that does take kindly to exceptions? > > DOH!!!! God damn typos! > > Ever use C++ in a system that does NOT take kindly to exceptions? Usually they don't take kindly to catch or to catch-and-rethrow. most of them abort just as well upon throw as they do upon abort(). It seems strange to me that there are systems that don't work at least with catch because it's implementable with just general purpose programming and a little linker-tickle (see how g++ does it for Linux, for example). rtti even turns out little more than fancy error codes that vary with the link and come with a name translation (in which you can embed a global stable code). -- Tristan Wibberley The message body is Copyright (C) 2026 Tristan Wibberley except citations and quotations noted. All Rights Reserved except that you may, of course, cite it academically giving credit to me, distribute it verbatim as part of a usenet system or its archives, and use it to promote my greatness and general superiority without misrepresentation of my opinions other than my opinion of my greatness and general superiority which you _may_ misrepresent. You definitely MAY NOT train any production AI system with it but you may train experimental AI that will only be used for evaluation of the AI methods it implements.
Technical Details
Message-ID:
<11f0j2e$2i7jn$8@dont-email.me>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11eh538$3fet7$1@dont-email.me> <11ehine$3kr02$1@dont-email.me> <11ej3eh$5ajn$3@dont-email.me> <11ej4cd$5t50$1@raubtier-asyl.eternal-september.org> <11ekfj1$mq5n$2@dont-email.me> <11ekjq8$pmch$1@raubtier-asyl.eternal-september.org> <11el04s$vsdj$1@dont-email.me> <11ell4a$18v5e$1@raubtier-asyl.eternal-september.org> <11enbjl$25eoi$2@dont-email.me> <11eo66o$2ij72$1@raubtier-asyl.eternal-september.org> <11eq58s$3jdjs$6@dont-email.me> <11eso94$sn9c$3@raubtier-asyl.eternal-september.org> <11esptc$ti7s$1@dont-email.me> <11esq8g$tq1o$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> Newsgroups: comp.lang.c Subject: Re: is a wrapper on memory-allocation calls a good idea? Date: Sat, 5 Dec 2026 08:47:10 +0000 Organization: A noiseless patient Spider Lines: 43 Message-ID: <11f0j2e$2i7jn$8@dont-email.me> References: <11eh538$3fet7$1@dont-email.me> <11ehine$3kr02$1@dont-email.me> <11ej3eh$5ajn$3@dont-email.me> <11ej4cd$5t50$1@raubtier-asyl.eternal-september.org> <11ekfj1$mq5n$2@dont-email.me> <11ekjq8$pmch$1@raubtier-asyl.eternal-september.org> <11el04s$vsdj$1@dont-email.me> <11ell4a$18v5e$1@raubtier-asyl.eternal-september.org> <11enbjl$25eoi$2@dont-email.me> <11eo66o$2ij72$1@raubtier-asyl.eternal-september.org> <11eq58s$3jdjs$6@dont-email.me> <11eso94$sn9c$3@raubtier-asyl.eternal-september.org> <11esptc$ti7s$1@dont-email.me> <11esq8g$tq1o$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Sat, 05 Dec 2026 08:47:11 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2694775"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Gse9Emg/szWwYl78Z7UuRoIHy8uGPc07s5bxQlwjMFg=="; posting-host="e210ba6551fa09f4d8612e67f408742d" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:35KZC7nnA7RupCQTXldIoHQsgJ0= sha256:1rqiUIj/BrhEJNDDZOEdXl3GLMzXO5+DGkpUzAFKs4E= sha1:/t+bjF/appOeQ34GJVaAo/EmsPY= sha256:EPIMLtOgdqMnbrzQv0dl1xP9zfu30PeJfWyq+wRKv6s= Content-Language: en-GB In-Reply-To: <11esq8g$tq1o$1@dont-email.me>