Task #3687
closedReduce usage of shared_ptr in NameTree
Added by Junxiao Shi over 8 years ago. Updated almost 8 years ago.
100%
Description
In NameTree and name tree entry API, change shared_ptr
parameters to constant or mutable reference parameters, wherever it's feasible.
Updated by Junxiao Shi over 8 years ago
- Related to Task #3164: Reduce usage of shared_ptr in FIB/PIT/StrategyChoice/Measurements added
Updated by Junxiao Shi over 8 years ago
- % Done changed from 0 to 10
https://gerrit.named-data.net/2980 corrects code style in NameTree
and name tree entry.
I intentionally keep "refactoring" minimal, and avoid moving code up and down.
Updated by Junxiao Shi over 8 years ago
- % Done changed from 10 to 40
https://gerrit.named-data.net/3015 refactors NameTree iterator in preparation for shared_ptr
changes.
All existing test cases are passing.
Updated by Junxiao Shi over 8 years ago
https://gerrit.named-data.net/3017 refactors NameTree hashtable to make it a separate component.
patchset1 has the API only. I will wait for reviews on the API before proceeding further.
Updated by Junxiao Shi over 8 years ago
https://gerrit.named-data.net/3017 patchset2 has partial implementation of NameTree hashtable.
I haven't converted iterator part; to avoid conflicts, I won't do that until https://gerrit.named-data.net/3015 is approved.
Updated by Junxiao Shi over 8 years ago
- % Done changed from 40 to 60
https://gerrit.named-data.net/3017 patchset3 completes hashtable refactoring, but I'll add more test cases.
Updated by Junxiao Shi over 8 years ago
https://gerrit.named-data.net/3017 patchset5 adds test cases for hashtable.
Updated by Junxiao Shi over 8 years ago
- % Done changed from 60 to 70
https://gerrit.named-data.net/3049 patchset2 deletes functions deprecated in previous two commits, and improves Doxygen.
https://gerrit.named-data.net/3050 patchset3 changes return type of findExactMatch
and findLongestPrefixMatch
to Entry*
.
Updated by Junxiao Shi over 8 years ago
- % Done changed from 70 to 80
https://gerrit.named-data.net/3058 ensures NameTree::lookup(tableEntry)
to have "find or insert" semantics equivalent to Name::lookup(Name)
.
It handles special cases such as Fib::s_emptyEntry
and PIT entry ending with digest attached on one-shorter-prefix.
Prior usages of NameTree::lookup(tableEntry)
have been replaced with NameTree::getEntry
if insertion is undesired.
https://gerrit.named-data.net/3059 changes the return type of NameTree::lookup
from shared_ptr<Entry>
to Entry&
.
Updated by Junxiao Shi over 8 years ago
https://gerrit.named-data.net/3064 simplifies Fib::findLongestPrefixMatch
and StrategyChoice::findEffectiveStrategy
.
https://gerrit.named-data.net/3065 deletes unnecessary name_tree::Iterator
destructor.
It was introduced when I initially designed the iterator to be a base class, and full/partial/all-match have iterator subclasses; that idea didn't work, but I forgot to delete the destructor.
Updated by Junxiao Shi over 8 years ago
- Status changed from In Progress to Code review
- % Done changed from 80 to 100
https://gerrit.named-data.net/3068 changes cleanupOnFaceRemoval
procedure so it doesn't rely on weak_ptr<name_tree::Entry>
.
https://gerrit.named-data.net/3069 makes Node
the sole owner of Entry
. It allocates and deallocates Entry
through new
and delete
.
No shared_ptr<name_tree::Entry>
exist after this change.
Updated by Junxiao Shi over 8 years ago
https://gerrit.named-data.net/3069 patchset6 makes Entry
a member field of Node
to avoid separate memory allocations for Node
and Entry
.
Updated by Junxiao Shi over 8 years ago
- Status changed from Code review to Closed
Updated by Junxiao Shi about 8 years ago
- Status changed from Closed to Feedback
Reopening, because I need to update NFD devguide "NameTree" section.
Updated by Junxiao Shi almost 8 years ago
- Status changed from Feedback to Closed
NFD devguide is updated in nfd-docs:commit:7b3c50490482a82383f4fb2a889978cff4556580