Memory leak in IntersectionOperator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Fix Released
|
Undecided
|
Andre Massing |
Bug Description
As I'm doing a large number of iterations where I call Function:
After some fiddling around, I think I've spotted where it comes from. When IntersectionOpe
In any case, adding an explicit tree.reset() to IntersectionOpe
To reproduce :
UnitInterval mesh(50);
double x[1] = {.5};
const Point point(1, y);
while (true)
{
// Track memory usage
proc_t p;
look_
std::cout << p.rss << endl;
for (int i = 0 ; i < 100 ; i++)
{
mesh.
// Force IO to build a new tree (called by, e.g., Function::eval)
mesh.
}
}
Related branches
- Garth Wells: Pending requested
-
Diff: 34 lines (+10/-1)1 file modifieddolfin/intersection/IntersectionOperatorImplementation.h (+10/-1)
Changed in dolfin: | |
assignee: | nobody → Andre Massing (massing) |
Changed in dolfin: | |
status: | New → Confirmed |
Changed in dolfin: | |
status: | Confirmed → Fix Committed |
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
Thanks for reporting the bug, providing a test example and including patch. I want to dive a bit more into the code on Monday as I am wondering why the smart_pointer did not prevent the memory leak. Many thanks for your debugging work!