Compare commits
1
Commits
main
..
9590264572
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9590264572 |
@@ -549,7 +549,6 @@ inline void Node48::copyChildrenAndKeyFrom(const Node16 &other) {
|
|||||||
assert(numChildren == Node16::kMaxNodes);
|
assert(numChildren == Node16::kMaxNodes);
|
||||||
memset(index, -1, sizeof(index));
|
memset(index, -1, sizeof(index));
|
||||||
memset(children, 0, sizeof(children));
|
memset(children, 0, sizeof(children));
|
||||||
memset(reverseIndex, 0, sizeof(reverseIndex));
|
|
||||||
const auto z = InternalVersionT::zero;
|
const auto z = InternalVersionT::zero;
|
||||||
for (auto &v : childMaxVersion) {
|
for (auto &v : childMaxVersion) {
|
||||||
v = z;
|
v = z;
|
||||||
@@ -569,13 +568,6 @@ inline void Node48::copyChildrenAndKeyFrom(const Node16 &other) {
|
|||||||
std::max(maxOfMax[i >> Node48::kMaxOfMaxShift], childMaxVersion[i]);
|
std::max(maxOfMax[i >> Node48::kMaxOfMaxShift], childMaxVersion[i]);
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
// The reverseIndex bytes beyond numChildren are initialized so that the
|
|
||||||
// SIMD loads of a full 16-byte page in scan16 are well-defined (reading
|
|
||||||
// indeterminate bytes is UB in C++). valgrind then treats them as undefined
|
|
||||||
// so that it can still flag any read that relies on them.
|
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(reverseIndex + numChildren,
|
|
||||||
sizeof(reverseIndex) -
|
|
||||||
numChildren * sizeof(reverseIndex[0]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Node48::copyChildrenAndKeyFrom(const Node48 &other) {
|
inline void Node48::copyChildrenAndKeyFrom(const Node48 &other) {
|
||||||
@@ -602,7 +594,6 @@ inline void Node48::copyChildrenAndKeyFrom(const Node256 &other) {
|
|||||||
copyCommon(*this, other);
|
copyCommon(*this, other);
|
||||||
memset(index, -1, sizeof(index));
|
memset(index, -1, sizeof(index));
|
||||||
memset(children, 0, sizeof(children));
|
memset(children, 0, sizeof(children));
|
||||||
memset(reverseIndex, 0, sizeof(reverseIndex));
|
|
||||||
const auto z = InternalVersionT::zero;
|
const auto z = InternalVersionT::zero;
|
||||||
for (auto &v : childMaxVersion) {
|
for (auto &v : childMaxVersion) {
|
||||||
v = z;
|
v = z;
|
||||||
@@ -624,13 +615,6 @@ inline void Node48::copyChildrenAndKeyFrom(const Node256 &other) {
|
|||||||
++i;
|
++i;
|
||||||
});
|
});
|
||||||
memcpy(partialKey(), &other + 1, partialKeyLen);
|
memcpy(partialKey(), &other + 1, partialKeyLen);
|
||||||
// The reverseIndex bytes beyond numChildren are initialized so that the
|
|
||||||
// SIMD loads of a full 16-byte page in scan16 are well-defined (reading
|
|
||||||
// indeterminate bytes is UB in C++). valgrind then treats them as undefined
|
|
||||||
// so that it can still flag any read that relies on them.
|
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(reverseIndex + numChildren,
|
|
||||||
sizeof(reverseIndex) -
|
|
||||||
numChildren * sizeof(reverseIndex[0]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Node256::copyChildrenAndKeyFrom(const Node48 &other) {
|
inline void Node256::copyChildrenAndKeyFrom(const Node48 &other) {
|
||||||
@@ -2025,8 +2009,6 @@ Node *erase(Node *self, WriteContext *writeContext, bool logical) {
|
|||||||
parent48->childMaxVersion[lastChildrenIndex] = writeContext->zero;
|
parent48->childMaxVersion[lastChildrenIndex] = writeContext->zero;
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(parent48->children + lastChildrenIndex,
|
VALGRIND_MAKE_MEM_UNDEFINED(parent48->children + lastChildrenIndex,
|
||||||
sizeof(parent48->children[0]));
|
sizeof(parent48->children[0]));
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(parent48->reverseIndex + lastChildrenIndex,
|
|
||||||
sizeof(parent48->reverseIndex[0]));
|
|
||||||
|
|
||||||
if (needsDownsize(parent48)) {
|
if (needsDownsize(parent48)) {
|
||||||
downsize(parent48, writeContext);
|
downsize(parent48, writeContext);
|
||||||
|
|||||||
Reference in New Issue
Block a user