• Home
  • Raw
  • Download

Lines Matching refs:bytes

114 void ArenaAllocatorStatsImpl<kCount>::RecordAlloc(size_t bytes, ArenaAllocKind kind) {  in RecordAlloc()  argument
115 alloc_stats_[kind] += bytes; in RecordAlloc()
218 void* ArenaAllocator::AllocWithMemoryTool(size_t bytes, ArenaAllocKind kind) { in AllocWithMemoryTool() argument
222 size_t rounded_bytes = RoundUp(bytes + kMemoryToolRedZoneBytes, 8); in AllocWithMemoryTool()
231 MEMORY_TOOL_MAKE_DEFINED(ret, bytes); in AllocWithMemoryTool()
233 DCHECK(std::all_of(ret, ret + bytes, [](uint8_t val) { return val == 0u; })); in AllocWithMemoryTool()
237 void* ArenaAllocator::AllocWithMemoryToolAlign16(size_t bytes, ArenaAllocKind kind) { in AllocWithMemoryToolAlign16() argument
241 size_t rounded_bytes = bytes + kMemoryToolRedZoneBytes; in AllocWithMemoryToolAlign16()
255 MEMORY_TOOL_MAKE_DEFINED(ret, bytes); in AllocWithMemoryToolAlign16()
257 DCHECK(std::all_of(ret, ret + bytes, [](uint8_t val) { return val == 0u; })); in AllocWithMemoryToolAlign16()
274 uint8_t* ArenaAllocator::AllocFromNewArena(size_t bytes) { in AllocFromNewArena() argument
275 Arena* new_arena = pool_->AllocArena(std::max(arena_allocator::kArenaDefaultSize, bytes)); in AllocFromNewArena()
277 DCHECK_LE(bytes, new_arena->Size()); in AllocFromNewArena()
278 if (static_cast<size_t>(end_ - ptr_) > new_arena->Size() - bytes) { in AllocFromNewArena()
282 new_arena->bytes_allocated_ = bytes; // UpdateBytesAllocated() on the new_arena. in AllocFromNewArena()
292 ptr_ = begin_ + bytes; in AllocFromNewArena()
298 uint8_t* ArenaAllocator::AllocFromNewArenaWithMemoryTool(size_t bytes) { in AllocFromNewArenaWithMemoryTool() argument
299 uint8_t* ret = AllocFromNewArena(bytes); in AllocFromNewArenaWithMemoryTool()
300 uint8_t* noaccess_begin = ret + bytes; in AllocFromNewArenaWithMemoryTool()
303 DCHECK(ptr_ - bytes == ret); in AllocFromNewArenaWithMemoryTool()
309 DCHECK_EQ(bytes, arena_head_->next_->GetBytesAllocated()); in AllocFromNewArenaWithMemoryTool()