|
[Sponsors] |
April 23, 2007, 17:02 |
Any comments anyone?
Should
|
#1 |
Senior Member
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22 |
Any comments anyone?
Should we be worried about this potential problem in a fairly low-level but very important class for OpenFOAM? Is it possible to know what kind of problem was solved by this modification to the file tmpI.H? Should we reactivate the little piece of code commented out in tmp<t>::clear()? Just curious, Martin |
|
April 24, 2007, 13:57 |
Robert,
I changed the opera
|
#2 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Robert,
I changed the operation of tmp::clear() for the 1.3 release to force the clearance of temporary objects at the bottom of call-chains irrespective of their reference count, which should be valid if they really are temporary. This improved the storage efficiency of OpenFOAM and hasn't caused any problems so far. Objects for which clearance in this manner is not allowable should not be created as temporaries. However, I wasn't careful in the handling of assignments to temporaries (not something we do very often in OpenFOAM codes) and your test code does flag-up a problem. Here is a new version of tmpI.H with a corrected handling of object clearance on assignment which solves the problem for your test code and which I now have running in our OpenFOAM test-loop under valgrind. Henry |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Understanding tmp%2360T classes | nadine | OpenFOAM Running, Solving & CFD | 14 | January 22, 2009 10:25 |
What is the role of tmp%2360T class objects | nicasch | OpenFOAM Running, Solving & CFD | 0 | September 17, 2008 04:29 |
Error glibc detected munmap_chunk invalid pointer | sega | OpenFOAM Running, Solving & CFD | 6 | June 3, 2008 19:30 |
Register pointer to class in mesh objectRegistry | kar | OpenFOAM | 1 | June 3, 2008 05:57 |
Accessing a pointer away from current pointer | shephali shrimali | FLUENT | 0 | May 10, 2007 08:54 |