I think my other responses cover this specific question, but your general point 
is well taken.  Calling destructors is not a normal usage scenario, so these 
destructor fixes aren't a big deal.  I added them because I wanted to reduce 
the memory leak errors from valgrind.

Brad


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
nathan binkert
Sent: Wednesday, November 18, 2009 8:42 PM
To: M5 Developer List
Subject: Re: [m5-dev] changeset in m5: m5: fixed destructor to deschedulethe 
tickEven...

Interesting, so these events were getting destroyed, resulting in crap
being on the event queue?  I'm sure that this happens elsewhere.
Something to check for.  Normally nobody actually terminates a
simulation in such a way that normal destructors get called.  What are
you doing?

  Nate


On Wed, Nov 18, 2009 at 6:05 PM, Brad Beckmann <[email protected]> wrote:
> changeset 788cdecedf9f in /z/repo/m5
> details: http://repo.m5sim.org/m5?cmd=changeset;node=788cdecedf9f
> description:
>        m5: fixed destructor to deschedule the tickEvent and event
>
> diffstat:
>
> 1 file changed, 2 insertions(+)
> src/dev/mc146818.cc |    2 ++
>
> diffs (12 lines):
>
> diff -r c2dfa12ea482 -r 788cdecedf9f src/dev/mc146818.cc
> --- a/src/dev/mc146818.cc       Wed Nov 18 13:55:58 2009 -0800
> +++ b/src/dev/mc146818.cc       Wed Nov 18 13:55:58 2009 -0800
> @@ -105,6 +105,8 @@
>
>  MC146818::~MC146818()
>  {
> +    deschedule(tickEvent);
> +    deschedule(event);
>  }
>
>  void
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>
>
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev


_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to