Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 06e743c

Browse files
Multimodcraftershilangyu
authored andcommitted
Fix NFA memory usage and typo
1 parent cb8d7ea commit 06e743c

File tree

1 file changed

+2
-1
lines changed
  • regex-automata/src/nfa/thompson

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,7 @@ impl NFA {
11851185
+ self.0.states.len() * size_of::<State>()
11861186
+ self.0.start_pattern.len() * size_of::<StateID>()
11871187
+ self.0.group_info.memory_usage()
1188+
+ self.0.start_look_behind.len() * size_of::<StateID>()
11881189
+ self.0.memory_extra
11891190
}
11901191
}
@@ -1276,7 +1277,7 @@ pub(super) struct Inner {
12761277
/// This is needed to initialize the table for storing the result of
12771278
/// look-around evaluation.
12781279
lookaround_count: usize,
1279-
/// Contains the start states for each of the look-behind subexpressions.
1280+
/// Contains the start state for each of the look-behind subexpressions.
12801281
start_look_behind: Vec<StateID>,
12811282
/// Heap memory used indirectly by NFA states and other things (like the
12821283
/// various capturing group representations above). Since each state

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /