public inbox for
 help / color / mirror / Atom feed
From: Jonathan Wakely <>
To: "François Dumont" <>
Cc: "" <>,
	gcc-patches <>
Subject: Re: [PATCH] Use mallinfo2 with glibc >= 2.33
Date: Wed, 7 Sep 2022 18:10:27 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Wed, 7 Sept 2022 at 18:03, François Dumont via Libstdc++
<> wrote:
> libstdc++: Use glibc >= 2.33 mallinfo2 function
> mallinfo started to be deprecated which makes performance tests failed
> to build, just
> adopt mallinfo2.
> libstdcxx-v3/ChangeLog:
>          * testsuite/util/testsuite_performance.h (__mallinfo): New, our
> own mallinfo

There's no reason to use a reserved name here, this isn't a header
that users include.

I would call the struct MallocInfo and the function malloc_info().
Even better, put them both in namespace __gnu_test, as
__gnu_test::MallocInfo and __gnu_test::malloc_info (without the extern
"C" language linkage). If we're not calling the glibc function
directly, but via our own wrapper, then there's no reason it has to
use the name "mallinfo", no reason it has to be in the global
namespace, and no reason it has to be extern "C" (in fact, I don't
think there was ever a reason for it to be extern "C").

>          struct with just what we need. When using glibc >= 2.33 use
> mallinfo2 to
>          populate it.
> Tested under Linux x86_64,
> Ok to commit ?
> François

  reply	other threads:[~2022-09-07 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 17:02 François Dumont
2022-09-07 17:10 ` Jonathan Wakely [this message]
2022-09-08  5:03   ` François Dumont
2022-09-08  8:48     ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).