• Home
  • Raw
  • Download

Lines Matching refs:size

40     if (last_size != entry.size) {  in DumpFreeMap()
41 last_size = entry.size; in DumpFreeMap()
45 << " size=" << std::dec << entry.free_by_start_entry->size; in DumpFreeMap()
56 DCHECK_NE(chunk.size, 0u); in InsertChunk()
59 free_by_size_.emplace(chunk.size, insert_result.first); in InsertChunk()
75 if (munmap(chunk.ptr, chunk.size) != 0) { in ~SwapSpace()
77 << static_cast<const void*>(chunk.ptr) << " size=" << chunk.size; in ~SwapSpace()
86 if (free_by_start.size() != free_by_size.size()) { in CollectFree()
87 LOG(FATAL) << "Size: " << free_by_start.size() << " vs " << free_by_size.size(); in CollectFree()
93 sum1 += entry.free_by_start_entry->size; in CollectFree()
99 sum2 += entry.size; in CollectFree()
108 void* SwapSpace::Alloc(size_t size) { in Alloc() argument
110 size = RoundUp(size, 8U); in Alloc()
116 : free_by_size_.lower_bound(FreeBySizeEntry { size, free_by_start_.begin() }); in Alloc()
119 if (old_chunk.size == size) { in Alloc()
127 it->free_by_start_entry->ptr += size; in Alloc()
128 it->free_by_start_entry->size -= size; in Alloc()
131 node.value().size -= size; in Alloc()
137 SpaceChunk new_chunk = NewFileChunk(size); in Alloc()
138 if (new_chunk.size != size) { in Alloc()
140 SpaceChunk remainder = { new_chunk.ptr + size, new_chunk.size - size }; in Alloc()
175 void SwapSpace::Free(void* ptr, size_t size) { in Free() argument
177 size = RoundUp(size, 8U); in Free()
184 SpaceChunk chunk = { reinterpret_cast<uint8_t*>(ptr), size }; in Free()
192 chunk.size += prev->size; in Free()
193 chunk.ptr -= prev->size; in Free()
194 auto erase_pos = free_by_size_.find(FreeBySizeEntry { prev->size, prev }); in Free()
204 chunk.size += it->size; in Free()
205 auto erase_pos = free_by_size_.find(FreeBySizeEntry { it->size, it }); in Free()
216 if (free_after != free_before + size) { in Free()
218 …CHECK_EQ(free_after, free_before + size) << "Should be " << size << " difference from " << free_be… in Free()