Lines Matching refs:size
43 << " size=" << std::dec << entry.second->size; in DumpFreeMap()
60 DCHECK_NE(chunk.size, 0u); in InsertChunk()
63 free_by_size->emplace(chunk.size, insert_result.first); in InsertChunk()
82 if (free_by_start.size() != free_by_size.size()) { in CollectFree()
83 LOG(FATAL) << "Size: " << free_by_start.size() << " vs " << free_by_size.size(); in CollectFree()
89 sum1 += entry.second->size; in CollectFree()
95 sum2 += entry.size; in CollectFree()
104 void* SwapSpace::Alloc(size_t size) { in Alloc() argument
106 size = RoundUp(size, 8U); in Alloc()
113 : free_by_size_.lower_bound(FreeBySizeEntry { size, free_by_start_.begin() }); in Alloc()
119 old_chunk = NewFileChunk(size); in Alloc()
124 if (old_chunk.size != size) { in Alloc()
126 SpaceChunk new_chunk = { old_chunk.ptr + size, old_chunk.size - size }; in Alloc()
163 void SwapSpace::Free(void* ptrV, size_t size) { in Free() argument
165 size = RoundUp(size, 8U); in Free()
172 SpaceChunk chunk = { reinterpret_cast<uint8_t*>(ptrV), size }; in Free()
180 chunk.size += prev->size; in Free()
181 chunk.ptr -= prev->size; in Free()
182 auto erase_pos = free_by_size_.find(FreeBySizeEntry { prev->size, prev }); in Free()
192 chunk.size += it->size; in Free()
193 auto erase_pos = free_by_size_.find(FreeBySizeEntry { it->size, it }); in Free()
204 if (free_after != free_before + size) { in Free()
206 …CHECK_EQ(free_after, free_before + size) << "Should be " << size << " difference from " << free_be… in Free()