Article View: comp.lang.c
Article #84Re: Real world switch () with the MPS memory pool system!
From: Stefan Ram
Date: Fri, 09 Oct 2026 14:30
Date: Fri, 09 Oct 2026 14:30
28 lines
2786 bytes
2786 bytes
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote or quoted: >So the question here is, do you think this is reasonable C code, and >would you write something similar yourself? After all, /kind/ is an >enum, and the compiler might complain if you don't handle all the cases, I see no problem with the code after a first quick reading. As a matter of style, I might have added a "const" here or there. However, this is less important for simple small functions. The fact that this function is small makes it actually quite readable. A type such as "mps_addr_t" might hide an asterisk. So, "mps *" might be more readable than "mps_addr_t" because it uses the language to express the addressness instead of less clear names and allows the adding of "const"s, as in "mps const * const" where appropriate. OTOH, sometimes one wants to hide such details, but then one also would avoid inserting "addr_t" into a name. The functions lacks documentation such as can be written using Doxygen or something. So it's intended semantics are unknown and we cannot review that aspect. Newsgroups: comp.lang.c,comp.lang.misc,comp.lang.lisp Followup-To: comp.lang.c
Technical Details
Message-ID:
<code-20261009152721@ram.dialup.fu-berlin.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!not-for-mailReferences:
<EUBxS.8919$mPXe.2290@fx06.ams4>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.c,comp.lang.misc,comp.lang.lisp
Subject: Re: Real world switch () with the MPS memory pool system!
Followup-To: comp.lang.c
Date: 9 Oct 2026 14:30:36 GMT
Organization: Stefan Ram
Lines: 28
Expires: 1 Sep 2027 11:59:58 GMT
Message-ID: <code-20261009152721@ram.dialup.fu-berlin.de>
References: <EUBxS.8919$mPXe.2290@fx06.ams4>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de 6OfEnKaHmkZP5nfU8YmrowtsgeEXEgvC4om1DeIprpVtSz
Cancel-Lock: sha1:lISfojn4ncVDrF/wJjgnIhkQ4d0= sha256:gSAngboKqyf3Y2YzRj1/qgm4+gzpcmZXblgLOlhCawc=
X-Copyright: (C) Copyright 2026 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en