pelahi / VELOCIraptor-STF

Galaxy/(sub)Halo finder for N-body simulations
MIT License
19 stars 26 forks source link

Fix several memory leaks in the Swift interface #55

Closed jchelly closed 5 years ago

jchelly commented 5 years ago

I've found that a small dmonly swift run with on-the-fly velociraptor eventually crashes with an out of memory error. Running in ddt shows that it's leaking memory on each velociraptor invocation, mainly because the pfof array in InvokeVelociraptorHydro doesn't get deallocated. This merge request fixes that and a couple of much smaller leaks.

There's still one more leak I haven't tracked down. The array returned by BuildPGList sometimes isn't deallocated but I don't know which call to BuildPGList is the problem.

pelahi commented 5 years ago

Thanks John. I had similar fixes but hadn't had a chance to test and push.