[Scilab-users] Running long term script - suggestion needed

Clément David clement.david at scilab-enterprises.com
Fri Jul 8 10:48:17 CEST 2016


Hello Grzegorz,

This seems to be a memory leak somewhere, could you check that your `udp_recv` gateway does not
leak. On our side, if you do not append to buffer nothing should leak.

To check that the Java render is correct, you could connect to the Scilab JVM using VisualVM [1] and
check the allocated memory from the Java side.

[1]: https://visualvm.java.net/

--
Clément

Le mercredi 06 juillet 2016 à 10:39 +0200, Grzegorz Skiba a écrit :
> Dear Scilab users, 
> 
> I'm writing script which uses GUI and it receives data from embedded device via UDP protocol.
> Script will be used for monitoring and it has to run continuously for 7-8 days.
> I did some test on it and I see that after 24hour test Scilab process consumes 400MB RAM memory
>  more and it continuously allocates memory (I use windows process manager).
> 
> My script uses uicontrol and plot control to present data live. It receives data via UDP (custom
> DLL function is called) and buffer which holds plot data is shifted and plotted. 
> 
> Here is simplified main loop code:
> 
> buf_len = 100;
> buffer = zeros(1,buf_len);
> while 1   
>         // blocking udp receive call, returns matrix 5x20
>         data = udp_recv(5, 20);
>         data_size = size(data(:,1));
>         
>         // do some buffer shifting 
> 
>         // put received data to buffer
> 
>        // update plot 
>        a.children.children.data(:,2) = buffer';
> end
> 
> What can couse continous Scilab process memory allocation? Maybe I should use globals for buffer
> and data variable ? Any suggestion on this ? 
> 
> Thank you, Grzegorz 
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list