~jjohansen/+junk/apparmor_dbus_patches

Viewing all changes in revision 1867.

  • Committer: John Johansen
  • Date: 2011-12-15 13:14:37 UTC
  • Revision ID: john.johansen@canonical.com-20111215131437-r4w3iygpnnwcv6qb
Split the nodeset used in computing the dfa into two sets, accepting and
non-accepting, and have the proto-state use them.

To reduce memory overhead each set gains its own "cache" that make sure
there is only a single instance of each NodeSet generated.  And since
we have a cache abstraction, move relavent stats into it.

Also refactor code slightly to make caches and work_queue etc, DFA member
variables instead of passing them as parameters.

The split + caching results in a small reduction in memory use as the
cost of ProtoState + Caching is less than the redundancy that is eliminated.
However this results in a small decrease in performance.

Sorry I know this really should have been split into multiple patches
but the patch evolved and I got lazy and decided to just not bother
splitting it.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: