On Wed, Mar 18, 2015 at 10:57:33PM +0000, Andrew Ross wrote:
> On Wed, Mar 18, 2015 at 12:59:18AM -0700, Alan Irwin wrote:
> > @Andrew: There are some really interesting release implications here,
> > and if you feel Norman's fix (ideally in git am form as I have
> > requested from him below) or some other variant of it you like is a
> > no-brainer please go ahead and push it (see my further comment on the
> > release delay implications at the end.).
> 
> Norman,
> 
> I'm not sure I agree with your patch here in general. I've tested it on
> Linux and it makes no difference to my valgrind results. Further, adding
> in some debugging statements shows that at the point you set plsc->tidy
> the dispatch table entry is NULL anyway so your code makes no difference.
> This is with dynamic drivers. Are you using static drivers? In that case
> things may be different and we need to investigate more closely.
> 
> Also, looking at the code in plP_tidy, the tidy function
> dispatch_table[dev - 1]->pl_tidy should already be called. Again debugging
> statements show this is the case, so I can well see why you end up with a
> double call for the psc driver if your change was having an effect. 
> 
> Can you confirm the build options you are using for plplot, and also the
> precise way you ran valgrind to generate this feedback. Since I'm unable
> to reproduce your results I'm a bit confused at precisely what the memory
> issue is.
> 

OK. To follow up my own post I think I now know what is going wrong. You
fix is definitely wrong, because if you do compile without dynamic drivers
then your code results in a double call to the tidy function. I was
exiting the examples using return or 'Q', which results in stream_closed
being set to 0 so the tidy function is called. If you exit by pressing the
close button at the top of the xwin window however, then stream_closed = 1
and so the tidy function is not called. This results in an additional memory 
leak. I'll have a look how to fix that.

Norman, can you confirm that my interpretation of what you are doing is
correct?

Thanks

Andrew

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to