MCPcopy Create free account
hub / github.com/apache/arrow / GrowByFactor

Function GrowByFactor

cpp/src/arrow/buffer_builder.h:102–108  ·  view source on GitHub ↗

\brief Return a capacity expanded by the desired growth factor

Source from the content-addressed store, hash-verified

100
101 /// \brief Return a capacity expanded by the desired growth factor
102 static int64_t GrowByFactor(int64_t current_capacity, int64_t new_capacity) {
103 // Doubling capacity except for large Reserve requests. 2x growth strategy
104 // (versus 1.5x) seems to have slightly better performance when using
105 // jemalloc, but significantly better performance when using the system
106 // allocator. See ARROW-6450 for further discussion
107 return std::max(new_capacity, current_capacity * 2);
108 }
109
110 /// \brief Append the given data to the buffer
111 ///

Callers 5

ReserveFunction · 0.85
AppendFunction · 0.85
ReserveMethod · 0.85
ReserveMethod · 0.85
ReserveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected