MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / print_memory_state

Method print_memory_state

src/core/impl/comp_node/mem_alloc/impl.cpp:129–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void MemAllocImplHelper::print_memory_state() {
130 auto stat = get_free_memory();
131 MGB_MARK_USED_VAR(stat);
132 mgb_log("device memory allocator stats: %s: "
133 "used=%zu free={tot:%zu, min_blk:%zu, max_blk:%zu, nr:%zu}",
134 get_name().c_str(), get_used_memory(), stat.tot, stat.min, stat.max,
135 stat.nr_blk);
136}
137
138FreeMemStat MemAllocImplHelper::get_free_memory_self_unsafe() {
139 FreeMemStat stat{0, std::numeric_limits<size_t>::max(), 0, 0};

Callers 2

TESTFunction · 0.45
log_mem_pool_detailsMethod · 0.45

Calls 5

get_nameFunction · 0.85
to_stringFunction · 0.85
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.36