Article View: comp.lang.c
Article #1967Re: is wraper on realloc good idea? maybe more wrappers?
From: Ross Finlayson
Date: Sun, 29 Nov 2026 15:43
Date: Sun, 29 Nov 2026 15:43
69 lines
4936 bytes
4936 bytes
On 11/29/2026 06:57 AM, fir wrote:
> fir pisze:
>> never used it but generally wrappers on some standard functions
>> probably are good idea, or not?
>
> i also think if not tu built in system for localizing runtime errors
>
> i rarely have runtime errors but when something appears its unplesant
> the you need to do such weird debug thing to localize crash
>
> sulution would be doing some simple list where i would log some
> function tags in array in ram then probably i could show this is
> system/signal/crash handler i guess
>
> i will see and probably will check it when having runtime cras next time
In a sort of "C-minus" approach for "global-calls" or "glo-calls" above
"system-calls" or sys-calls", like I was just saying, there's an idea
to _hide_ syscalls via glocalls, that since when above "bare metal"
there's for example POSIX or the O.S. and processes & threads, where
a certain amount of discipline can always begin a process with
installing "glo-calls", then begin a thread with installing "glo-calls",
then with thread-local-storage making function pointers,
then that those are typed and for example live in a struct according
to types so the compiler can infer their types, then basically
that it adds a layer of functional indirection to each of those calls,
which some may aver would be wrong, yet then would be modular and
decomposable & recomposable, for composability, and modularity.
Kind of like syscalls are issued numbers then made signatures their
functional signatures, it's a similar idea for glocalls, except for
the process & thread, instead of the overall "globals" or system itself.
Then another thing fir scribbled the other day was unbalanced
parentheses, was "A { B { } /* closes A */ } /* closes B */ "
which is unbalanced when "A{ B{} }" is nested, about the state & scope
and a sort of "rock & roll" approach when re-using buffers, this
being about that in C: there's later the _defer_ keyword, which
indicates "the execution-graph will result in the flow-graph that
any of many possible exit-points visits the deferred statements
in LIFO order", and the call-stack in LIFO and call-sites in FIFO,
entry-sites and exit-sites or entry-points and exit-points, about
basically the "computed return value" which is a compiler extension
so that a function can know whether it's a first-descendent or
sibling or where it's at the location, about entry-points, since
there's no way to cover all the exit-points, without a lot of discipline
and redundancy in code, or changing the calling conventions.
I.e., the LIFO account of the call-stack and the linear contiguous
process/thread address space makes for lots of opportunities to use
arithmetic for the LIFO call-stack and FIFO call-sites, given that
there's not "goto" and that callee-functions always return to the
caller-function, about for example rocking & rolling re-used buffers
down through a bunch of property accessors and formatters, vis-a-vis
glo-calls about threads with small caches for re-used buffers,
then making for "location" as considered a sort of first-class
account for debugging, when basically that "locators" and "location",
like "source locators" or ye olde "FILE, LINE, ..." macros,
instead to just have locators according to the debug symbols so
that functions can just have a static variable that according to
the lifetime of the thread a thread-local variable for re-entrancy,
is about location and LIFO call-stack and FIFO call-site in all the code.
Technical Details
Message-ID:
<d4-dnToMi6Tf1ZH2nZ2dnZfqn_qdnZ2d@giganews.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-4.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-3.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<11eh538$3fet7$1@dont-email.me> <11eheha$3j5qd$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-4.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-3.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 29 Nov 2026 15:44:02 +0000 Subject: Re: is wraper on realloc good idea? maybe more wrappers? Newsgroups: comp.lang.c References: <11eh538$3fet7$1@dont-email.me> <11eheha$3j5qd$1@dont-email.me> From: Ross Finlayson <ross.a.finlayson@gmail.com> Date: Sun, 29 Nov 2026 07:43:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <11eheha$3j5qd$1@dont-email.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <d4-dnToMi6Tf1ZH2nZ2dnZfqn_qdnZ2d@giganews.com> Lines: 69 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-CgAs3Qfd7bvsR8UKhJVKUKo7dtiS1qbbsx6jiCelZbSQIGTIrcm5/1W8kwQjo9efojvFmB7ij4MkyF3!9a4lgHfsleY07n0mA9dh15b0Qc7OrJpBXwGrl7tYggZt4E6JYOWCxLox/nTapXVMvVXLzZpajPEg X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40