We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53be2e0 commit 2aef605Copy full SHA for 2aef605
compiler-rt/lib/sanitizer_common/sanitizer_common.h
@@ -519,8 +519,8 @@ class InternalMmapVectorNoCtor {
519
return data_[i];
520
}
521
void push_back(const T &element) {
522
- CHECK_LE(size_, capacity());
523
- if (size_ == capacity()) {
+ if (UNLIKELY(size_ >= capacity())) {
+ CHECK_EQ(size_, capacity());
524
uptr new_capacity = RoundUpToPowerOfTwo(size_ + 1);
525
Realloc(new_capacity);
526
@@ -580,7 +580,7 @@ class InternalMmapVectorNoCtor {
580
581
582
private:
583
- void Realloc(uptr new_capacity) {
+ NOINLINE void Realloc(uptr new_capacity) {
584
CHECK_GT(new_capacity, 0);
585
CHECK_LE(size_, new_capacity);
586
uptr new_capacity_bytes =
0 commit comments