Question: Any way to reclaim NAG (_d01akc) allocated memory ?

I am evaluating a difficult integral of an oscillating function.


evalf(Int(f, kmin..kmax, method = _d01akc,epsilon=eps,maxintervals=1000000))

with dz>0 and possibly very large
kmin is Pi/(2*dz)
the number of cycles is nc = ceil((1/2)*kl*dz/Pi) with kl = 91.563
kmax=  kmin+nc*2*Pi/dz

Each evaluation of this integral using a call to the NAG routine (_d01akc ) eats up 
a large of amount of physical memory. After 50 evaluation memory cache is exhausted.

Any way to recover memory allocated by _d01akc after each evaluation

Thanks a lot

Please Wait...