public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tromey at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/12533] gdb consumes large memory when millions gdb.values are created
Date: Fri, 02 Dec 2011 18:02:00 -0000	[thread overview]
Message-ID: <bug-12533-4717-WSm8Qq6rJw@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-12533-4717@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=12533

--- Comment #2 from Tom Tromey <tromey at redhat dot com> 2011-12-02 18:02:12 UTC ---
It took me a while, but I finally understand why this is non-trivial.

My initial idea was to change value_to_value_object to release the
value from the value chain (or incref if already released).
This would cause memory management of the value to be strictly linked
to the wrapping python object.

However, this causes various problems.  First, some python code returns
unwrapped values; e.g., fnpy_call or things like pretty_print_one_value.
Changing this to incref would avoid the crashes, but then that passes
the deallocation problem to their callers, which in general are not
set up to deal with this -- all the rest of gdb relies on the value chain.

Perhaps it would work to relink a value onto the chain.  That seems quite
ugly though.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  parent reply	other threads:[~2011-12-02 18:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 11:36 [Bug python/12533] New: " joachim.protze at zih dot tu-dresden.de
2011-11-23 21:09 ` [Bug python/12533] " tromey at redhat dot com
2011-12-02 18:02 ` tromey at redhat dot com [this message]
2011-12-08 19:00 ` ian at mahuron dot org
2011-12-22 19:52 ` cvs-commit at gcc dot gnu.org
2011-12-22 19:53 ` tromey at redhat dot com
2011-12-22 21:34 ` ian at mahuron dot org
2011-12-23  2:46 ` tromey at redhat dot com
2012-01-03 19:28 ` cvs-commit at gcc dot gnu.org
2012-01-03 19:30 ` tromey at redhat dot com
2012-01-03 19:44 ` ian at mahuron dot org
2023-02-27 22:56 ` cvs-commit at gcc dot gnu.org

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=bug-12533-4717-WSm8Qq6rJw@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.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).