Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Cc: toolchain-devel@blackfin.uclinux.org
Subject: [PATCH] sim: enable hw_tree_delete in sim_hw_uninstall
Date: Fri, 31 Dec 2010 22:25:00 -0000	[thread overview]
Message-ID: <1293819313-29542-1-git-send-email-vapier@gentoo.org> (raw)

I can't find any history for why the call to hw_tree_delete is commented
out, and the VCS history shows that this goes back to the original import
in 2009.  I did find some vague reference to it from 2000 (pretty close
to the original import of code), but no actual details.

Without this call, every new instance of the sim results in all old
previously allocated resources being leaked.  With some devices, this
isn't just memory, it's things like open file descriptors or mmaps.

So if there are pending issues with this, I'd rather we get the sims
sorted out rather than continuing to leak this stuff.  Especially since
the "let's wait for the sims to fix themselves" hasn't actually happened
in the last 10+ years.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2010-12-31  Mike Frysinger  <vapier@gentoo.org>

	* sim-hw.c (sim_hw_uninstall): Uncomment hw_tree_delete.
---
 sim/common/sim-hw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c
index e946f67..9f37145 100644
--- a/sim/common/sim-hw.c
+++ b/sim/common/sim-hw.c
@@ -318,7 +318,7 @@ sim_hw_init (struct sim_state *sd)
 static void
 sim_hw_uninstall (struct sim_state *sd)
 {
-  /* hw_tree_delete (STATE_HW (sd)->tree); */
+  hw_tree_delete (STATE_HW (sd)->tree);
   free (STATE_HW (sd));
   STATE_HW (sd) = NULL;
 }
-- 
1.7.3.1


             reply	other threads:[~2010-12-31 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-31 22:25 Mike Frysinger [this message]
2011-01-12 21:28 ` Joel Brobecker
2011-01-12 23:16   ` Mike Frysinger

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=1293819313-29542-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    --cc=toolchain-devel@blackfin.uclinux.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