[fix](memory) Remove ChunkAllocator & fix Allocator no use mmap (#21259)
This commit is contained in:
@ -55,7 +55,6 @@
|
||||
#include "runtime/heartbeat_flags.h"
|
||||
#include "runtime/load_channel_mgr.h"
|
||||
#include "runtime/load_path_mgr.h"
|
||||
#include "runtime/memory/chunk_allocator.h"
|
||||
#include "runtime/memory/mem_tracker.h"
|
||||
#include "runtime/memory/mem_tracker_limiter.h"
|
||||
#include "runtime/memory/thread_mem_tracker_mgr.h"
|
||||
@ -314,23 +313,6 @@ Status ExecEnv::_init_mem_env() {
|
||||
|
||||
// 4. init other managers
|
||||
RETURN_IF_ERROR(_block_spill_mgr->init());
|
||||
|
||||
// 5. init chunk allocator
|
||||
if (!BitUtil::IsPowerOf2(config::min_chunk_reserved_bytes)) {
|
||||
ss << "Config min_chunk_reserved_bytes must be a power-of-two: "
|
||||
<< config::min_chunk_reserved_bytes;
|
||||
return Status::InternalError(ss.str());
|
||||
}
|
||||
|
||||
int64_t chunk_reserved_bytes_limit =
|
||||
ParseUtil::parse_mem_spec(config::chunk_reserved_bytes_limit, MemInfo::mem_limit(),
|
||||
MemInfo::physical_mem(), &is_percent);
|
||||
chunk_reserved_bytes_limit =
|
||||
BitUtil::RoundDown(chunk_reserved_bytes_limit, config::min_chunk_reserved_bytes);
|
||||
ChunkAllocator::init_instance(chunk_reserved_bytes_limit);
|
||||
LOG(INFO) << "Chunk allocator memory limit: "
|
||||
<< PrettyPrinter::print(chunk_reserved_bytes_limit, TUnit::BYTES)
|
||||
<< ", origin config value: " << config::chunk_reserved_bytes_limit;
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user