Skip to content

Commit 5f966e3

Browse files
Fix memory usage calculation
1 parent 26bcd72 commit 5f966e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

regex-automata/src/nfa/thompson/pikevm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,8 @@ impl Cache {
21462146
(self.stack.len() * size_of::<FollowEpsilon>())
21472147
+ self.curr.memory_usage()
21482148
+ self.next.memory_usage()
2149+
+ self.curr_lookaround.memory_usage()
2150+
+ self.next_lookaround.memory_usage()
21492151
}
21502152

21512153
/// Clears this cache. This should be called at the start of every search

0 commit comments

Comments
 (0)