Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #402853

Re: Real world switch () with the MPS memory pool system!

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 2026-10-09 14:30 +0000
Organization Stefan Ram
Message-ID <code-20261009152721@ram.dialup.fu-berlin.de> (permalink)
References <EUBxS.8919$mPXe.2290@fx06.ams4>

Cross-posted to 3 groups.

Followups directed to: comp.lang.c

Show all headers | View raw


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

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Real world switch () with the MPS memory pool system! Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-08 08:58 +0800
  Re: Real world switch () with the MPS memory pool system! Kaz Kylheku <046-301-5902@kylheku.com> - 2026-10-08 01:31 +0000
    Re: Real world switch () with the MPS memory pool system! Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-10 04:26 +0800
      Re: Real world switch () with the MPS memory pool system! Kaz Kylheku <046-301-5902@kylheku.com> - 2026-10-09 20:45 +0000
        Re: Real world switch () with the MPS memory pool system! Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-10 05:02 +0800
          Re: Real world switch () with the MPS memory pool system! Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-11 09:28 +0800
      Re: Real world switch () with the MPS memory pool system! tfb <tfb@work.it.out> - 2026-10-10 09:45 +0000
        Re: Real world switch () with the MPS memory pool system! George Neuner <gneuner2@comcast.net> - 2026-10-11 01:13 -0400
          Re: Real world switch () with the MPS memory pool system! Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-11 14:45 +0800
          Re: Real world switch () with the MPS memory pool system! tfb <tfb@work.it.out> - 2026-10-11 07:28 +0000
            Re: Real world switch () with the MPS memory pool system! Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-11 15:41 +0800
            Re: Real world switch () with the MPS memory pool system! George Neuner <gneuner2@comcast.net> - 2026-10-11 05:29 -0400
  Re: Real world switch () with the MPS memory pool system! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-08 06:03 -0700
  Re: Real world switch () with the MPS memory pool system! ram@zedat.fu-berlin.de (Stefan Ram) - 2026-10-09 14:30 +0000
    Re: Real world switch () with the MPS memory pool system! Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-10 04:41 +0800

csiph-web