mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
rose: use ROUNDUP_N for alignment
This commit is contained in:
parent
09d19c7c57
commit
60fc975c81
@ -2126,9 +2126,7 @@ void allocateStateSpace(const NFA *nfa, NfaInfo &nfa_info, bool is_transient,
|
||||
// Uncompressed state in scratch must be aligned.
|
||||
u32 alignReq = state_alignment(*nfa);
|
||||
assert(alignReq);
|
||||
while (*scratchStateSize % alignReq) {
|
||||
(*scratchStateSize)++;
|
||||
}
|
||||
*scratchStateSize = ROUNDUP_N(*scratchStateSize, alignReq);
|
||||
nfa_info.fullStateOffset = *scratchStateSize;
|
||||
*scratchStateSize += nfa->scratchStateSize;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user