<< "\n";
});
Seg.WorkingMem = SegAddr.toPtr<char *>();
- Seg.Addr = SegAddr + NextSlabDelta;
+ Seg.Addr = SegAddr + SlabDelta;
SegAddr += alignTo(Seg.ContentSize + Seg.ZeroFillSize, PageSize);
memset(Seg.WorkingMem + Seg.ContentSize, 0, Seg.ZeroFillSize);
}
- NextSlabDelta += SegsSizes->total();
-
if (auto Err = BL.apply()) {
OnAllocated(std::move(Err));
return;
// Calculate the target address delta to link as-if slab were at
// SlabAddress.
if (SlabAddress != ~0ULL)
- NextSlabDelta = ExecutorAddr(SlabAddress) -
+ SlabDelta = ExecutorAddr(SlabAddress) -
ExecutorAddr::fromPtr(SlabRemaining.base());
}
std::mutex SlabMutex;
sys::MemoryBlock SlabRemaining;
uint64_t PageSize = 0;
- int64_t NextSlabDelta = 0;
+ int64_t SlabDelta = 0;
};
Expected<uint64_t> getSlabAllocSize(StringRef SizeString) {