Skip to content

allocator initial cpu memory usage is too large #11272

@tensor-tang

Description

@tensor-tang

This is an issue related with #11185

Even we can use fraction_of_cpu_memory_to_use to work around, but it's still tricky and does not make sense that init memory with max_chunk_size_ which it 3% memory.

BuddyAllocator::PoolSet::iterator BuddyAllocator::RefillPool() :

// Allocate a new maximum sized block
size_t index = 0;
void* p = system_allocator_->Alloc(&index, max_chunk_size_);

void* BuddyAllocator::Alloc(size_t unaligned_size) :

// refill the pool if failure
if (it == pool_.end()) {
it = RefillPool();

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions