Home
last modified time | relevance | path

Searched refs:new_capacity (Results 1 – 5 of 5) sorted by relevance

/ndk/sources/android/crazy_linker/src/
Dcrazy_linker_util.cpp73 size_t new_capacity = capacity_; in Resize() local
74 while (new_capacity < new_size) { in Resize()
75 new_capacity += (new_capacity >> 1) + 16; in Resize()
77 Reserve(new_capacity); in Resize()
88 void String::Reserve(size_t new_capacity) { in Reserve() argument
91 ptr_ = reinterpret_cast<char*>(realloc(old_ptr, new_capacity + 1)); in Reserve()
92 ptr_[new_capacity] = '\0'; in Reserve()
93 capacity_ = new_capacity; in Reserve()
95 if (size_ > new_capacity) in Reserve()
96 size_ = new_capacity; in Reserve()
Dcrazy_linker_line_reader.cpp100 size_t new_capacity = buff_capacity_ * 2; in GetNextLine() local
102 buff_ = static_cast<char*>(::realloc(old_buff, new_capacity)); in GetNextLine()
106 buff_capacity_ = new_capacity; in GetNextLine()
Dcrazy_linker_util.h112 void Reserve(size_t new_capacity);
186 void Reserve(size_t new_capacity);
236 void Vector<T>::Reserve(size_t new_capacity) { in Reserve() argument
237 items_ = reinterpret_cast<T*>(realloc(items_, new_capacity * sizeof(T))); in Reserve()
238 capacity_ = new_capacity; in Reserve()
/ndk/sources/android/support/tests/minitest/
Dminitest.cc107 size_t new_capacity = capacity_; in Resize() local
108 while (new_capacity < new_size) in Resize()
109 new_capacity += (new_capacity >> 1) + 8; in Resize()
111 Reserve(new_capacity); in Resize()
117 void String::Reserve(size_t new_capacity) { in Reserve() argument
118 str_ = reinterpret_cast<char*>(::realloc(str_, new_capacity + 1)); in Reserve()
119 if (new_capacity > capacity_) in Reserve()
120 ::memset(str_ + capacity_, '\0', new_capacity - capacity_); in Reserve()
121 capacity_ = new_capacity; in Reserve()
Dminitest.h187 void Reserve(size_t new_capacity);