mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 00:02:24 +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
@@ -496,7 +496,7 @@ bytecode_ptr<NFA> mcclellanCompile16(dfa_info &info, const CompileContext &cc,
|
||||
accel_offset -= sizeof(NFA); /* adj accel offset to be relative to m */
|
||||
assert(ISALIGNED_N(accel_offset, alignof(union AccelAux)));
|
||||
|
||||
auto nfa = make_bytecode_ptr<NFA>(total_size);
|
||||
auto nfa = make_zeroed_bytecode_ptr<NFA>(total_size);
|
||||
char *nfa_base = (char *)nfa.get();
|
||||
|
||||
populateBasicInfo(sizeof(u16), info, total_size, aux_offset, accel_offset,
|
||||
@@ -715,7 +715,7 @@ bytecode_ptr<NFA> mcclellanCompile8(dfa_info &info, const CompileContext &cc,
|
||||
accel_offset -= sizeof(NFA); /* adj accel offset to be relative to m */
|
||||
assert(ISALIGNED_N(accel_offset, alignof(union AccelAux)));
|
||||
|
||||
auto nfa = bytecode_ptr<NFA>(total_size);
|
||||
auto nfa = make_zeroed_bytecode_ptr<NFA>(total_size);
|
||||
char *nfa_base = (char *)nfa.get();
|
||||
|
||||
mcclellan *m = (mcclellan *)getMutableImplNfa(nfa.get());
|
||||
|
Reference in New Issue
Block a user