| 369 | } |
| 370 | |
| 371 | size_t AllocationClass::getAllocIdx(const Slab* slab, |
| 372 | void* alloc) const noexcept { |
| 373 | const size_t offset = reinterpret_cast<uintptr_t>(alloc) - |
| 374 | reinterpret_cast<uintptr_t>(slab->memoryAtOffset(0)); |
| 375 | XDCHECK_EQ(0u, offset % allocationSize_); |
| 376 | XDCHECK_LT(offset, Slab::kSize); |
| 377 | return offset / allocationSize_; |
| 378 | } |
| 379 | |
| 380 | void AllocationClass::partitionFreeAllocs(const Slab* slab, |
| 381 | FreeList& freeAllocs, |
no outgoing calls