Re: [PATCH] Plug two small memory leaks

2013-02-20 Thread Nicholas Marriott
Ok no worries, thanks. On Wed, Feb 20, 2013 at 08:48:11PM +0100, Romain Francoise wrote: > Nicholas Marriott writes: > > > This is with: > > > valgrind --leak-check=full --trace-children=yes --trace-children-skip=*sh > > --log-file=out ./tmux new > > > How are you running valgrind? > > Are yo

Re: [PATCH] Plug two small memory leaks

2013-02-20 Thread Romain Francoise
Nicholas Marriott writes: > This is with: > valgrind --leak-check=full --trace-children=yes --trace-children-skip=*sh > --log-file=out ./tmux new > How are you running valgrind? > Are you sure you are using a clean, unmodified checkout from latest git? > What are you doing to test? I have a l

Re: [PATCH] Plug two small memory leaks

2013-02-16 Thread Nicholas Marriott
Hi With 1 window, 1 pane and ~100 lines of history and resizing the window about quite a bit, I do not see any unreachable memory at exit. ==1253== LEAK SUMMARY: ==1253==definitely lost: 40 bytes in 1 blocks ==1253==indirectly lost: 120 bytes in 10 blocks ==1253== possibly lost: 0 by

Re: [PATCH] Plug two small memory leaks

2013-02-16 Thread Romain Francoise
Nicholas Marriott writes: > So you don't see this if you comment out the screen_reflow call? Or do > the leaked allocations move somewhere else? Without the screen_reflow call I get only this one: ==19895== 127,862 bytes in 481 blocks are definitely lost in loss record 196 of 197 ==19895==

Re: [PATCH] Plug two small memory leaks

2013-02-16 Thread Nicholas Marriott
Oh right sorry I forgot. Don't see anything obvious in grid_reflow_join and I can't test this out now. So you don't see this if you comment out the screen_reflow call? Or do the leaked allocations move somewhere else? On Sat, Feb 16, 2013 at 08:54:43PM +0100, Romain Francoise wrote: > Nicholas

Re: [PATCH] Plug two small memory leaks

2013-02-16 Thread Romain Francoise
Nicholas Marriott writes: > Do you have this change? I was the one who reported this particular issue in the first place. And the reason I'm using Valgrind now is that even after this change, tmux seems to leak. Example report of a few seconds of resizing my terminal: ==19895== HEAP SUMMARY: =

Re: [PATCH] Plug two small memory leaks

2013-02-16 Thread Nicholas Marriott
I've applied these fixes as well, thanks. On Sat, Feb 16, 2013 at 03:03:18PM +0100, Romain Francoise wrote: > While testing the reflow code I noticed that resizing the screen a lot > seems to leak some memory, and Valgrind agrees. In fact, memory gets > leaked even if I compile out the reflow cod

Re: [PATCH] Plug two small memory leaks

2013-02-16 Thread Nicholas Marriott
Do you have this change? commit 28544391f5b478d215131c7b1d63590f7338e692 Author: Nicholas Marriott Date: Thu Feb 14 12:20:17 2013 + Do not leak formats in status_replace. diff --git a/status.c b/status.c index 13ea9a5..636f627 100644 --- a/status.c +++ b/status.c @@ -503,7 +503,7 @@ s

[PATCH] Plug two small memory leaks

2013-02-16 Thread Romain Francoise
While testing the reflow code I noticed that resizing the screen a lot seems to leak some memory, and Valgrind agrees. In fact, memory gets leaked even if I compile out the reflow code, so there are probably some old bugs in there. I'm trying to understand what we're doing wrong but in the meantim