This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/12533] gdb consumes large memory when millionsgdb.values are created
- From: "tromey at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 02 Dec 2011 18:02:12 +0000
- Subject: [Bug python/12533] gdb consumes large memory when millionsgdb.values are created
- Auto-submitted: auto-generated
- References: <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.