Skip to content

Commit c0ed26d

Browse files
Pranav Bhandarifacebook-github-bot
Pranav Bhandari
authored andcommitted
T2 cleanup
Summary: Some cleanup from changes for T2 compressed pointer. Reviewed By: haowu14 Differential Revision: D64537349 fbshipit-source-id: 5a53fabc81d62cef3fdc61909f5dcc4932b267b1
1 parent ebaec74 commit c0ed26d

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

cachelib/allocator/memory/CompressedPtr.h

-5
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ class CACHELIB_PACKED_ATTR CompressedPtr4B {
7070
return ptr_ == ptr.ptr_;
7171
}
7272
bool operator!=(const PtrType ptr) const noexcept { return !(ptr == ptr_); }
73-
// If the allocSize is smaller than this, then pointer compression is not
74-
// going to work.
75-
// static constexpr uint32_t getMinAllocSize() noexcept {
76-
// return static_cast<uint32_t>(1) << (Slab::kMinAllocPower);
77-
// }
7873

7974
// maximum addressable memory for pointer compression to work.
8075
static constexpr size_t getMaxAddressableSize() noexcept {

cachelib/allocator/memory/SlabAllocator.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,6 @@ SlabAllocator::SlabAllocator(const serialization::SlabAllocatorObject& object,
161161
*object.minAllocSize()));
162162
}
163163

164-
if (getMinAllocSize() != *object.minAllocSize()) {
165-
throw std::invalid_argument(folly::sformat(
166-
"current min alloc size {} does not match the previous one {}",
167-
getMinAllocSize(),
168-
*object.minAllocSize()));
169-
}
170-
171164
XDCHECK(isRestorable());
172165

173166
const size_t currSize = roundDownToSlabSize(memSize);

0 commit comments

Comments
 (0)