Article View: comp.lang.c
Article #1971Re: is wraper on realloc good idea? maybe more wrappers?
From: fir
Date: Sun, 29 Nov 2026 16:48
Date: Sun, 29 Nov 2026 16:48
21 lines
2414 bytes
2414 bytes
Andrey Tarasevich pisze: > On Sun 11/29/2026 4:16 AM, fir wrote: >> never used it but generally wrappers on some standard functions >> probably are good idea, or not? > > In programs that perform non-interactive batch-style processing (e.g. > config file on input, result file on output), error handling is usually > a very simple affair: just complain and abort, no need for any kind of > post-error recovery in most cases. In such programs wrappers around > malloc/calloc/realloc work very well. The wrapper checks for success and > simply aborts the entire program with an error message in case of > failure. This allows client code to completely forget about having to > worry about this sort of errors. I.e. it uses the wrapper under > assumption that the wrapper "always succeeds". > but there is normal ERROR (the one that calls ERROR() function , more specifically ERROR_() in my case as ERROR is by some sht reserved by winapi i guess) and there are CRASHes..crashes you need to localize, in winapi i may register signel handler so it calls my function that for example shows messagoe box ..
Technical Details
Message-ID:
<11ehl0l$3lnis$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!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>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: fir <profesor.fir@gmail.com> Newsgroups: comp.lang.c Subject: Re: is wraper on realloc good idea? maybe more wrappers? Date: Sun, 29 Nov 2026 17:48:20 +0100 Organization: A noiseless patient Spider Lines: 21 Message-ID: <11ehl0l$3lnis$1@dont-email.me> References: <11eh538$3fet7$1@dont-email.me> <11ehine$3kr02$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 29 Nov 2026 16:48:21 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3858012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eOtOaTX+GafDjo+Gf4I/KVx7TU7JObaU="; posting-host="010f8b8bacc4ceb5b8d9de2edad353cd" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0 SeaMonkey/2.53.24 Cancel-Lock: sha1:61ivFIaar5VJxCYlQnKt5J4J93Y= sha256:u/fS9VIbhMduj+O/IIvzoTNT0QroQYmhJfae1l//Ybg= sha1:lWHATQdq0bTDYfO1w2VgmkO9mv0= sha256:JFffU2/k6axExhUv8Hi0AKmvY6HHEZ0c0OE2PwGJeF0= In-Reply-To: <11ehine$3kr02$1@dont-email.me>