mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 00:02:24 +03:00
fdr: use bytecode_ptr internally
This commit is contained in:
committed by
Matthew Barr
parent
6499d306ec
commit
97516eccb6
@@ -342,7 +342,7 @@ getFDRConfirm(const vector<hwlmLiteral> &lits, bool make_small,
|
||||
return {move(fdrc), actual_size};
|
||||
}
|
||||
|
||||
pair<aligned_unique_ptr<u8>, size_t>
|
||||
bytecode_ptr<u8>
|
||||
setupFullConfs(const vector<hwlmLiteral> &lits,
|
||||
const EngineDescription &eng,
|
||||
map<BucketIndex, vector<LiteralIndex>> &bucketToLits,
|
||||
@@ -374,7 +374,7 @@ setupFullConfs(const vector<hwlmLiteral> &lits,
|
||||
u32 totalConfSwitchSize = nBuckets * sizeof(u32);
|
||||
u32 totalSize = ROUNDUP_16(totalConfSwitchSize + totalConfirmSize);
|
||||
|
||||
auto buf = aligned_zmalloc_unique<u8>(totalSize);
|
||||
auto buf = make_bytecode_ptr<u8>(totalSize, 16);
|
||||
assert(buf); // otherwise would have thrown std::bad_alloc
|
||||
|
||||
u32 *confBase = (u32 *)buf.get();
|
||||
@@ -389,7 +389,8 @@ setupFullConfs(const vector<hwlmLiteral> &lits,
|
||||
ptr += p.second;
|
||||
confBase[idx] = confirm_offset;
|
||||
}
|
||||
return {move(buf), totalSize};
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
} // namespace ue2
|
||||
|
Reference in New Issue
Block a user