Mike --

Your patch is not a good idea. We don't want to shut down and clean up after fftw after every execution of the decoder routines. Much information would need to be recomputed on the next call to the decoder.

        -- Joe, K1JT

On 2/27/2018 5:09 PM, Black Michael via wsjt-devel wrote:
This patch solves at least part of the memory leak problem seen with jt9.exe running under WSJT-X control.  jt9 happily passes valgrind checks running standalone.  It's the looping of jt9a causing problems.

In Windows you'll now see the memory usage go up and down whereas before it would only go up.

https://www.dropbox.com/s/mhnqzepw1fvbtt3/jt9a.patch?dl=1 <https://www.dropbox.com/s/mhnqzepw1fvbtt3/jt9a.patch?dl=0>


I'm using the program below to watch the memory usage of jt9.exe but WSJT-X keeps pausing the waterfall under my VM so it doesn't run for long.

I'm still seeing random increases in memory once in a while...every few minutes or so.
e.g. 32k, 24k, 4k, 52k.  Still trying to chase those down.



#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>

int
main (int argc, char *argv[])
{
   char cmd[256];
   int mem = 0;
   int memold = 0;
   sprintf (cmd, "ps aux | grep jt9 | grep -v grep");
   while (1)
     {
       FILE *pcmd = popen (cmd, "r");
       char buf[256];
       while (fgets (buf, sizeof (buf), pcmd))
         {
           //printf ("%s", buf);
           sscanf (buf, "%*s %*s %*g %*g %d", &mem);
           if (memold == 0)
             {
               memold = mem;
               system("date");
               printf ("mark %d\n", mem);
             }
           else
             {
               if (mem > memold)
                 {
                   memold = mem;
                   system("date");
                   printf ("mark %d\n", mem);
                 }
             }
         }
       pclose (pcmd);
       sleep(2);
     }
}


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to