Some cleanup needed

Bug #1166168 reported by Jiri Srba
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VerifyDTAPN
Fix Released
Undecided
Peter Gjøl Jensen

Bug Description

Referring to line numbers in the merge proposal

https://code.launchpad.net/~verifydtapn-contributers/verifydtapn/timeDartPtrie/+merge/154525

1) The file src/DiscreteVerification/DataStructures/EncodingStructure.cpp is practically empty?

2) The lines

2569 + void Release() const {
2570 + delete[] shadow;
2571 + }

seems a little dodgy? Shouldn't this be in the destructor?

3) The file src/DiscreteVerification/DataStructures/NonStrictMarking.cpp had it's contents deleted - but the file wasn't?

4) The file src/DiscreteVerification/DataStructures/PData.cpp is practically empty?

5) The comment "//possible mem-leek?" in line 3807 seems like it should be investigated?

Related branches

Revision history for this message
Peter Gjøl Jensen (peter-gjoel) wrote :

2 ) We do not necessearily want to delete the "shadow"-data (should be refactored later!) when the object is deallocated. If it was moved to the constructor, the PTrie implementation would break. It sometimes just "moves" data to a new object - this is an optimization to remove uneeded memory-allocation; removes practically seven of eigth needed calls to malloc.
The behavior can be observed in lines 366-391 of PData.h, lines 373 and 390 are interesting. The code handles moving a bucket (or parts thereof). Note that "EncodingStructure" objects are allocated in a consecutive array, and cannot be reused.

5 ) Constructor never used, removed. The following constructer is similar; it does not cause memory-leak, it is the desired behavior to copy enough data to recreate the marking. Added comments in code explaning the issue.

Empty files are removed, fix-branch is lp:~verifydtapn-contributers/verifydtapn/Cleanup.

Changed in verifydtapn:
status: New → Fix Committed
assignee: nobody → Peter Gjøl Jensen (peter-gjoel)
Revision history for this message
Jiri Srba (srba) wrote :

The same comment as in the other bug. If the branch is ready, just propose it for merging but do not change
the status of the bug.

Changed in verifydtapn:
status: Fix Committed → In Progress
Jiri Srba (srba)
Changed in verifydtapn:
status: In Progress → Fix Committed
Jiri Srba (srba)
Changed in verifydtapn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.