Skip to content

Commit 37304b2

Browse files
committed
Addressed review comment
1 parent 583c5c2 commit 37304b2

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

compiler-rt/lib/scudo/standalone/allocator_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ template <class SizeClassAllocator> struct BatchGroup {
8181
SinglyLinkedList<Batch<SizeClassAllocator>> Batches;
8282
// Cache value of SizeClassAllocatorLocalCache::getMaxCached()
8383
// TODO(chiahungduan): Except BatchClass, every Batch stores the same number
84-
// of blocks. As long as we make BatchClass follows this constraint, this
84+
// of blocks. As long as we make BatchClass follow this constraint, this
8585
// field can be removed.
8686
u16 MaxCachedPerBatch;
8787
};

compiler-rt/lib/scudo/standalone/primary32.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,12 @@ template <typename Config> class SizeClassAllocator32 {
744744

745745
// So far, instead of always filling the blocks to `MaxBlockCount`, we only
746746
// examine single `Batch` to minimize the time spent on the primary
747-
// allocator. Besides, the sizes of `Batch` and `CacheT::getMaxCached()` may
748-
// also impact the time spent on accessing the primary allocator.
747+
// allocator. Besides, the sizes of `Batch` and
748+
// `SizeClassAllocatorT::getMaxCached()` may also impact the time spent on
749+
// accessing the primary allocator.
749750
// TODO(chiahungduan): Evaluate if we want to always prepare `MaxBlockCount`
750751
// blocks and/or adjust the size of `Batch` according to
751-
// `CacheT::getMaxCached()`.
752+
// `SizeClassAllocatorT::getMaxCached()`.
752753
BatchT *B = Batches.front();
753754
DCHECK_NE(B, nullptr);
754755
DCHECK_GT(B->getCount(), 0U);

compiler-rt/lib/scudo/standalone/primary64.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -989,11 +989,12 @@ template <typename Config> class SizeClassAllocator64 {
989989

990990
// So far, instead of always filling blocks to `MaxBlockCount`, we only
991991
// examine single `Batch` to minimize the time spent in the primary
992-
// allocator. Besides, the sizes of `Batch` and `CacheT::getMaxCached()` may
993-
// also impact the time spent on accessing the primary allocator.
992+
// allocator. Besides, the sizes of `Batch` and
993+
// `SizeClassAllocatorT::getMaxCached()` may also impact the time spent on
994+
// accessing the primary allocator.
994995
// TODO(chiahungduan): Evaluate if we want to always prepare `MaxBlockCount`
995996
// blocks and/or adjust the size of `Batch` according to
996-
// `CacheT::getMaxCached()`.
997+
// `SizeClassAllocatorT::getMaxCached()`.
997998
BatchT *B = Batches.front();
998999
DCHECK_NE(B, nullptr);
9991000
DCHECK_GT(B->getCount(), 0U);

0 commit comments

Comments
 (0)