public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Tom Tromey <tromey@adacore.com>,
	 Andrew Burgess <aburgess@redhat.com>,
	Pedro Alves <pedro@palves.net>,
	 Andreas Arnez <arnez@linux.ibm.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 1/5] gdbsupport: Introduce obstack_newvec
Date: Thu, 02 Jun 2022 08:31:26 -0600	[thread overview]
Message-ID: <87czfr3znl.fsf@tromey.com> (raw)
In-Reply-To: <20220602133546.2948282-2-iii@linux.ibm.com> (Ilya Leoshkevich's message of "Thu, 2 Jun 2022 15:35:42 +0200")

>>>>> "Ilya" == Ilya Leoshkevich <iii@linux.ibm.com> writes:

Ilya> obstack_calloc() allocates multiple objects, but doesn't call their
Ilya> constructors.  obstack_new() allocates a single object and calls its
Ilya> constructor.  Introduce a new function that does both.

Is there some reason you want to keep these objects on the obstack at
all?  There's no requirement to do that in gdb, and it's probably
simpler to just use ordinary C++ allocation instead.

Tom

  reply	other threads:[~2022-06-02 14:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 13:35 [PATCH 0/5] gdb: Store section map in an interval tree Ilya Leoshkevich
2022-06-02 13:35 ` [PATCH 1/5] gdbsupport: Introduce obstack_newvec Ilya Leoshkevich
2022-06-02 14:31   ` Tom Tromey [this message]
2022-06-02 14:33     ` Ilya Leoshkevich
2022-06-02 13:35 ` [PATCH 2/5] gdbsupport: Introduce interval_tree Ilya Leoshkevich
2022-06-02 14:12   ` Pedro Alves
2022-06-02 14:17     ` Ilya Leoshkevich
2022-06-02 14:12   ` Pedro Alves
2022-06-02 14:37     ` Pedro Alves
2022-06-02 15:09       ` Ilya Leoshkevich
2022-06-02 18:04       ` Tom Tromey
2022-06-02 13:35 ` [PATCH 3/5] gdbsupport: Add interval_tree unit tests Ilya Leoshkevich
2022-06-02 13:35 ` [PATCH 4/5] gdbsupport: Add interval_tree fuzzing harness Ilya Leoshkevich
2022-06-02 13:35 ` [PATCH 5/5] gdb: Optimize section map Ilya Leoshkevich

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=87czfr3znl.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=aburgess@redhat.com \
    --cc=arnez@linux.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=iii@linux.ibm.com \
    --cc=pedro@palves.net \
    /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).