aleagpu - Alea doesnt release memory correctly -


it seems alea not disposing class devicememory2d correctly

my code checking free memory

let getfreememory () =     let free = marshal.allochglobal sizeof<uint64>     let total = marshal.allochglobal sizeof<uint64>      let freeptr = nativeinterop.nativeptr.ofnativeint<nativeint> free     let totalptr = nativeinterop.nativeptr.ofnativeint<nativeint> total      cudainterop.cumemgetinfo(freeptr, totalptr)     |> cusafecall      let result = nativeinterop.nativeptr.get freeptr 0      marshal.freehglobal free     marshal.freehglobal total      uint64 result 

and here's code checks whether there's leak

seq.init 100 (fun _ ->          use arr = gpu.default.allocatedevice<float>(1000,1000)           getfreememory()         |> printfn "%d"     ) |> seq.iter id 

the outputs

from output image, memory doesn't seem disposed

can try latest beta version: https://www.nuget.org/packages/alea/3.0.4-beta3


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -