Why the allocated memory keep increase in for loop

``````steps = 799500:100:800000

print("样本数为：",length(steps),"\n")

function main(filepath, nx, ny, nz, steps, Axi, Axj, Ayi, Ayj)

hx = 1.0/(nx - 1); hy = 1/(ny - 1);

for n in steps

print("读取\$(n)步 \n")

d, u, v, w, T = flow3D_Once(Fflow3d, nx, ny, nz)
close(Fflow3d)

#p = d .* T / (gamma*Ma^2)

Tsb = 110.4 / T_inf

Amu =@. 1.0 / Re * (1.0 + Tsb) * sqrt(T .^ 3)/ (Tsb + Tw)

ux, uy, uz = get_grad(u, hx, hy, Axi, Axj, Ayi, Ayj, sz)
vx, vy, vz = get_grad(v, hx, hy, Axi, Axj, Ayi, Ayj, sz)
wx, wy, wz = get_grad(w, hx, hy, Axi, Axj, Ayi, Ayj, sz)

Theta = ux + vy + wz

Sigma11 = @. (ux*2 - 2/3*Theta) * Amu
Sigma22 = @. (vy*2 - 2/3*Theta) * Amu
Sigma33 = @. (wz*2 - 2/3*Theta) * Amu
Sigma12 = @. (uy + vx) * Amu
Sigma23 = @. (vz + wy) * Amu
Sigma13 = @. (uz + wx) * Amu

f["σ11"] = Sigma11
f["σ22"] = Sigma22
f["σ33"] = Sigma33
f["σ12"] = Sigma12
f["σ13"] = Sigma13
f["σ23"] = Sigma23
f["θ"] = Theta
end
end

end

@time main(filepath, nx, ny, nz, steps, Axi, Axj, Ayi, Ayj)
``````