Skip to content

Commit dcf4290

Browse files
authored
Merge pull request #79 from igchor/fix_slab_release
Fix slab release code
2 parents c805e69 + 7a56883 commit dcf4290

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cachelib/allocator/CacheAllocator-inl.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3168,15 +3168,14 @@ bool CacheAllocator<CacheTrait>::markMovingForSlabRelease(
31683168
// At first, we assume this item was already freed
31693169
bool itemFreed = true;
31703170
bool markedMoving = false;
3171-
TierId tid = 0;
3172-
const auto fn = [&markedMoving, &itemFreed, &tid, this /* TODO - necessary for getTierId */](void* memory) {
3171+
TierId tid = getTierId(alloc);
3172+
const auto fn = [&markedMoving, &itemFreed](void* memory) {
31733173
// Since this callback is executed, the item is not yet freed
31743174
itemFreed = false;
31753175
Item* item = static_cast<Item*>(memory);
31763176
if (item->markMoving()) {
31773177
markedMoving = true;
31783178
}
3179-
tid = getTierId(*item);
31803179
};
31813180

31823181
auto startTime = util::getCurrentTimeSec();

0 commit comments

Comments
 (0)