public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Use mallinfo2 with glibc >= 2.33
Date: Wed, 7 Sep 2022 18:10:27 +0100	[thread overview]
Message-ID: <CACb0b4k7Gyza4O5w_bnhn+A3XDZ6nA2XcKGAvPywV04WNA9-Hg@mail.gmail.com> (raw)
In-Reply-To: <e5b4b0e9-eebf-3ad5-3c3f-86080816c330@gmail.com>

On Wed, 7 Sept 2022 at 18:03, François Dumont via Libstdc++
<libstdc++@gcc.gnu.org> 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=CACb0b4k7Gyza4O5w_bnhn+A3XDZ6nA2XcKGAvPywV04WNA9-Hg@mail.gmail.com \
    --to=jwakely@redhat.com \
    --cc=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).