Tim,

Your explanation is very helpful.  There is a complication though:
The function is actually called from another  function (from a chain of 
functions). Here is the measurement from a simplified situation:

        - using JFFoundationModule 
        - using FESetModule 
        -  
        - n=100; 
        - function test(n) 
        0     fes=FESetH8(conn=rand(JFInt,n,
8)) 
      112     conn1::JFIntMat=zeros(JFInt,nfense(fes),1); 
  6383704     for j=1:size(fes.conn,1) 
        0         getconn!(fes,conn1,j); 
        -     end 
        0     return true 
        - end 
        -  
        - test(n) 
        - clear_malloc_data() 
        - n=100000; 
        - test(n) 

As you can see the loop over the rows of the array fes.conn allocates 
substantial amount of memory.

Here is the type: https://gist.github.com/PetrKryslUCSD/794f521a8e5b057e5e4e

Petr

Reply via email to