mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Merge in rev 1422 from trunk: Cleaning up the sets firstpos, lastpos,
and followpos early reduces peak memory usage. Nominated-by: John Johansen <john.johansen@canonical.com> Acked-By: Steve Beattie <sbeattie@ubuntu.com>
This commit is contained in:
parent
8525087270
commit
8187d02864
1 changed files with 7 additions and 0 deletions
|
@ -1370,6 +1370,13 @@ DFA::DFA(Node *root, dfaflags_t flags) : root(root)
|
|||
here.cases.insert(*j);
|
||||
}
|
||||
}
|
||||
|
||||
for (depth_first_traversal i(root); i; i++) {
|
||||
(*i)->firstpos.clear();
|
||||
(*i)->lastpos.clear();
|
||||
(*i)->followpos.clear();
|
||||
}
|
||||
|
||||
if (flags & (DFA_DUMP_STATS))
|
||||
fprintf(stderr, "\033[2KCreated dfa: states %ld\tmatching %d\tnonmatching %d\n", states.size(), match_count, nomatch_count);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue