From: Tom Tromey <tromey@redhat.com>
To: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: gdb-patches@sourceware.org
Subject: Re: question: python gc doesn't collect buffer allocated by read_memory()
Date: Tue, 20 Mar 2012 20:59:00 -0000 [thread overview]
Message-ID: <87iphzhtvd.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20120319.151647.104032080.d.hatayama@jp.fujitsu.com> (HATAYAMA Daisuke's message of "Mon, 19 Mar 2012 15:16:47 +0900 ( )")
>>>>> ">" == HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> writes:
>> count = 100000
>> while count >= 0:
>> i.read_memory(buf.address, buf.type.sizeof)
>> count -= 1
You don't say what version of gdb you are using.
What you are reporting sounds like PR 12533, which was fixed in CVS back
in January.
>> 5. Looking at referrers of the buffer returned by read_memory(), they
>> are all empty [], so it looks OK to me if garbage collector collects
>> the memory...
In 12533 the problem was that intermediate values weren't properly
deallocated.
You could test for this problem by hoisting 'buf.address' out of the
loop and seeing if that has an effect.
Tom
next prev parent reply other threads:[~2012-03-20 20:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 6:17 HATAYAMA Daisuke
2012-03-20 20:59 ` Tom Tromey [this message]
2012-03-21 4:16 ` HATAYAMA Daisuke
2012-03-26 18:56 ` Tom Tromey
2012-03-27 1:52 ` HATAYAMA Daisuke
2012-03-28 17:37 ` Tom Tromey
2012-03-29 0:49 ` HATAYAMA Daisuke
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=87iphzhtvd.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=d.hatayama@jp.fujitsu.com \
--cc=gdb-patches@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