mirror of
https://github.com/matrix-construct/construct
synced 2024-06-10 22:18:54 +02:00
ircd::allocator: Pretty IEC units for memory info.
This commit is contained in:
parent
d5c3724428
commit
f023d05e66
|
@ -30,16 +30,16 @@ ircd::allocator::info(const mutable_buffer &buf)
|
|||
::mallinfo()
|
||||
};
|
||||
|
||||
out << "arena: " << ma.arena << std::endl
|
||||
out << "arena: " << pretty(iec(ma.arena)) << std::endl
|
||||
<< "ordblks: " << ma.ordblks << std::endl
|
||||
<< "smblks: " << ma.smblks << std::endl
|
||||
<< "hblks: " << ma.hblks << std::endl
|
||||
<< "hblkhd: " << ma.hblkhd << std::endl
|
||||
<< "usmblks: " << ma.usmblks << std::endl
|
||||
<< "fsmblks: " << ma.fsmblks << std::endl
|
||||
<< "uordblks: " << ma.uordblks << std::endl
|
||||
<< "fordblks: " << ma.fordblks << std::endl
|
||||
<< "keepcost: " << ma.keepcost << std::endl
|
||||
<< "hblkhd: " << pretty(iec(ma.hblkhd)) << std::endl
|
||||
<< "usmblks: " << pretty(iec(ma.usmblks)) << std::endl
|
||||
<< "fsmblks: " << pretty(iec(ma.fsmblks)) << std::endl
|
||||
<< "uordblks: " << pretty(iec(ma.uordblks)) << std::endl
|
||||
<< "fordblks: " << pretty(iec(ma.fordblks)) << std::endl
|
||||
<< "keepcost: " << pretty(iec(ma.keepcost)) << std::endl
|
||||
;
|
||||
|
||||
return view(out, buf);
|
||||
|
|
|
@ -590,8 +590,8 @@ console_cmd__mem(opt &out, const string_view &line)
|
|||
out << "IRCd thread allocations:" << std::endl
|
||||
<< "alloc count: " << this_thread.alloc_count << std::endl
|
||||
<< "freed count: " << this_thread.free_count << std::endl
|
||||
<< "alloc bytes: " << this_thread.alloc_bytes << std::endl
|
||||
<< "freed bytes: " << this_thread.free_bytes << std::endl
|
||||
<< "alloc bytes: " << pretty(iec(this_thread.alloc_bytes)) << std::endl
|
||||
<< "freed bytes: " << pretty(iec(this_thread.free_bytes)) << std::endl
|
||||
<< std::endl;
|
||||
|
||||
thread_local char buf[1024];
|
||||
|
|
Loading…
Reference in a new issue