brian2cuda icon indicating copy to clipboard operation
brian2cuda copied to clipboard

Fix memory leak when having multiple `run` calls

Open denisalevi opened this issue 3 years ago • 0 comments

There seems to be a memory leak when having multiple run calls, or at least the memory used on the GPU constantly increases.

  • In PR #300, I removed some memory leaks related synpse initialization (in before_run_synapses_push_spikes). It could be that I missed something and the leak comes from there (I only fixed the more obvious cases, didn't dig into detail here).
  • (This is only relevant for host memory) It could also come from somewhere else. We have e.g. static (file global) variables for the preparation of each codeobject file. Since we create a new codeobject for each run call, it makes sense that we increase the required memory.

denisalevi avatar Jun 22 '22 11:06 denisalevi