Lines Matching refs:size
177 size_t size = reinterpret_cast<byte*>(&temp.alloc_bit_map_) - reinterpret_cast<byte*>(&temp); in fixed_header_size() local
178 DCHECK_EQ(size, static_cast<size_t>(8)); in fixed_header_size()
179 return size; in fixed_header_size()
291 static size_t BracketSizeToIndex(size_t size) { in BracketSizeToIndex() argument
292 DCHECK(16 <= size && ((size < 1 * KB && size % 16 == 0) || size == 1 * KB || size == 2 * KB)); in BracketSizeToIndex()
294 if (UNLIKELY(size == 1 * KB)) { in BracketSizeToIndex()
296 } else if (UNLIKELY(size == 2 * KB)) { in BracketSizeToIndex()
299 DCHECK(size < 1 * KB); in BracketSizeToIndex()
300 DCHECK_EQ(size % 16, static_cast<size_t>(0)); in BracketSizeToIndex()
301 idx = size / 16 - 1; in BracketSizeToIndex()
303 DCHECK(bracketSizes[idx] == size); in BracketSizeToIndex()
307 static size_t RoundToBracketSize(size_t size) { in RoundToBracketSize() argument
308 DCHECK(size <= kLargeSizeThreshold); in RoundToBracketSize()
309 if (LIKELY(size <= 512)) { in RoundToBracketSize()
310 return RoundUp(size, 16); in RoundToBracketSize()
311 } else if (512 < size && size <= 1 * KB) { in RoundToBracketSize()
314 DCHECK(1 * KB < size && size <= 2 * KB); in RoundToBracketSize()
319 static size_t SizeToIndex(size_t size) { in SizeToIndex() argument
320 DCHECK(size <= kLargeSizeThreshold); in SizeToIndex()
321 if (LIKELY(size <= 512)) { in SizeToIndex()
322 return RoundUp(size, 16) / 16 - 1; in SizeToIndex()
323 } else if (512 < size && size <= 1 * KB) { in SizeToIndex()
326 DCHECK(1 * KB < size && size <= 2 * KB); in SizeToIndex()
331 static size_t SizeToIndexAndBracketSize(size_t size, size_t* bracket_size_out) { in SizeToIndexAndBracketSize() argument
332 DCHECK(size <= kLargeSizeThreshold); in SizeToIndexAndBracketSize()
333 if (LIKELY(size <= 512)) { in SizeToIndexAndBracketSize()
334 size_t bracket_size = RoundUp(size, 16); in SizeToIndexAndBracketSize()
339 } else if (512 < size && size <= 1 * KB) { in SizeToIndexAndBracketSize()
346 DCHECK(1 * KB < size && size <= 2 * KB); in SizeToIndexAndBracketSize()
491 void* AllocFromRun(Thread* self, size_t size, size_t* bytes_allocated)
495 void* AllocFromRunThreadUnsafe(Thread* self, size_t size, size_t* bytes_allocated)
514 void* AllocLargeObject(Thread* self, size_t size, size_t* bytes_allocated) LOCKS_EXCLUDED(lock_);
533 void* Alloc(Thread* self, size_t size, size_t* bytes_allocated)