mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
bytecode_ptr: add make_zeroed_bytecode_ptr
Rather than always zeroing memory.
This commit is contained in:
committed by
Matthew Barr
parent
5653fa55a1
commit
63fe84c3f1
@@ -137,7 +137,7 @@ bytecode_ptr<NFA> makeLbrNfa(NFAEngineType nfa_type, enum RepeatType rtype,
|
||||
}
|
||||
size_t len = sizeof(NFA) + sizeof(LbrStruct) + sizeof(RepeatInfo) +
|
||||
tableLen + sizeof(u64a);
|
||||
auto nfa = make_bytecode_ptr<NFA>(len);
|
||||
auto nfa = make_zeroed_bytecode_ptr<NFA>(len);
|
||||
nfa->type = verify_u8(nfa_type);
|
||||
nfa->length = verify_u32(len);
|
||||
return nfa;
|
||||
|
Reference in New Issue
Block a user