Lines Matching defs:BG

133       for (BatchGroupT &BG : Sci->FreeListInfo.BlockList) {
134 // `BG::Batches` are `TransferBatches`. +1 for `BatchGroup`.
135 BatchClassUsedInFreeLists += BG.Batches.size() + 1;
136 for (const auto &It : BG.Batches)
148 for (BatchGroupT &BG : Sci->FreeListInfo.BlockList) {
149 if (LIKELY(!BG.Batches.empty())) {
150 for (const auto &It : BG.Batches)
520 BatchGroupT *BG = Sci->FreeListInfo.BlockList.front();
522 if (BG == nullptr) {
524 BG = reinterpret_cast<BatchGroupT *>(
527 BG->Batches.clear();
530 BG->CompactPtrGroupBase = 0;
531 BG->BytesInBGAtLastCheckpoint = 0;
532 BG->MaxCachedPerBatch =
535 Sci->FreeListInfo.BlockList.push_front(BG);
544 if (BG->Batches.empty()) {
553 compactPtr(SizeClassMap::BatchClassId, reinterpret_cast<uptr>(BG)));
555 BG->Batches.push_front(TB);
558 TransferBatchT *CurBatch = BG->Batches.front();
563 static_cast<u16>(BG->MaxCachedPerBatch - CurBatch->getCount());
573 BG->Batches.push_front(CurBatch);
574 UnusedSlots = static_cast<u16>(BG->MaxCachedPerBatch - 1);
584 // FreeListInfo.BlockList - > BG -> BG -> BG
592 // Each BlockGroup(BG) will associate with unique group id and the free blocks
607 BatchGroupT *BG =
609 BG->Batches.clear();
614 BG->CompactPtrGroupBase = CompactPtrGroupBase;
615 BG->Batches.push_front(TB);
616 BG->BytesInBGAtLastCheckpoint = 0;
617 BG->MaxCachedPerBatch = TransferBatchT::MaxNumCached;
619 return BG;
622 auto InsertBlocks = [&](BatchGroupT *BG, CompactPtrT *Array, u32 Size) {
623 SinglyLinkedList<TransferBatchT> &Batches = BG->Batches;
628 DCHECK_GE(BG->MaxCachedPerBatch, CurBatch->getCount());
630 static_cast<u16>(BG->MaxCachedPerBatch - CurBatch->getCount());
636 UnusedSlots = BG->MaxCachedPerBatch;
718 BatchGroupT *BG = Sci->FreeListInfo.BlockList.front();
723 TransferBatchT *TB = reinterpret_cast<TransferBatchT *>(BG);
760 BatchGroupT *BG = Sci->FreeListInfo.BlockList.front();
769 C->deallocate(SizeClassMap::BatchClassId, BG);
1085 for (BatchGroupT &BG : Sci->FreeListInfo.BlockList) {
1086 const uptr GroupBase = decompactGroupBase(BG.CompactPtrGroupBase);
1096 // TransferBatches are pushed in front of BG.Batches. The first one may
1098 const uptr NumBlocks = (BG.Batches.size() - 1) * BG.MaxCachedPerBatch +
1099 BG.Batches.front()->getCount();
1103 if (BytesInBG <= BG.BytesInBGAtLastCheckpoint) {
1104 BG.BytesInBGAtLastCheckpoint = BytesInBG;
1108 const uptr PushedBytesDelta = BytesInBG - BG.BytesInBGAtLastCheckpoint;
1123 BG.BytesInBGAtLastCheckpoint = BytesInBG;
1129 for (const auto &It : BG.Batches)
1131 DCHECK_EQ(compactPtrGroupBase(It.get(I)), BG.CompactPtrGroupBase);
1142 Context.markFreeBlocksInRegion(BG.Batches, DecompactPtr, GroupBase,