Re: [Rd] Memory leak with tons of closed connections

2016-11-14 Thread Martin Maechler
> Gábor Csárdi > on Sun, 13 Nov 2016 20:49:57 + writes: > Using dup() before fdopen() (and calling fclose() on the connection > when it is closed) indeed fixes the memory leak. > Thank you, Gábor! Yes I can confirm that this fixes the memory leak. I'm

Re: [Rd] Memory leak with tons of closed connections

2016-11-13 Thread Gábor Csárdi
Using dup() before fdopen() (and calling fclose() on the connection when it is closed) indeed fixes the memory leak. FYI, Gabor Index: src/main/connections.c === --- src/main/connections.c (revision 71653) +++ src/main/connections.c

Re: [Rd] Memory leak with tons of closed connections

2016-11-11 Thread Gábor Csárdi
On Fri, Nov 11, 2016 at 12:46 PM, Gergely Daróczi wrote: [...] >> I've changed the above to *print* the gc() result every 1000th >> iteration, and after 100'000 iterations, there is still no >> memory increase from the point of view of R itself. Yes, R does not know about

Re: [Rd] Memory leak with tons of closed connections

2016-11-11 Thread Gergely Daróczi
On Fri, Nov 11, 2016 at 12:08 PM, Martin Maechler wrote: >> Gergely Daróczi >> on Thu, 10 Nov 2016 16:48:12 +0100 writes: > > > Dear All, > > I'm developing an R application running inside of a Java daemon on > >

Re: [Rd] Memory leak with tons of closed connections

2016-11-11 Thread Martin Maechler
> Gergely Daróczi > on Thu, 10 Nov 2016 16:48:12 +0100 writes: > Dear All, > I'm developing an R application running inside of a Java daemon on > multiple threads, and interacting with the parent daemon via stdin and > stdout. > Everything

[Rd] Memory leak with tons of closed connections

2016-11-10 Thread Gergely Daróczi
Dear All, I'm developing an R application running inside of a Java daemon on multiple threads, and interacting with the parent daemon via stdin and stdout. Everything works perfectly fine except for having some memory leaks somewhere. Simplified version of the R app: while (TRUE) {