0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::allocator: Use stack for pretty(iec()) format buffers.

This commit is contained in:
Jason Volk 2019-07-03 13:56:56 -07:00
parent d6b23cd9ac
commit 15e06e4d2e

View file

@ -32,16 +32,17 @@ ircd::allocator::info(const mutable_buffer &buf)
::mallinfo() ::mallinfo()
}; };
out << "arena: " << pretty(iec(ma.arena)) << std::endl char pbuf[96];
out << "arena: " << pretty(pbuf, iec(ma.arena)) << std::endl
<< "ordblks: " << ma.ordblks << std::endl << "ordblks: " << ma.ordblks << std::endl
<< "smblks: " << ma.smblks << std::endl << "smblks: " << ma.smblks << std::endl
<< "hblks: " << ma.hblks << std::endl << "hblks: " << ma.hblks << std::endl
<< "hblkhd: " << pretty(iec(ma.hblkhd)) << std::endl << "hblkhd: " << pretty(pbuf, iec(ma.hblkhd)) << std::endl
<< "usmblks: " << pretty(iec(ma.usmblks)) << std::endl << "usmblks: " << pretty(pbuf, iec(ma.usmblks)) << std::endl
<< "fsmblks: " << pretty(iec(ma.fsmblks)) << std::endl << "fsmblks: " << pretty(pbuf, iec(ma.fsmblks)) << std::endl
<< "uordblks: " << pretty(iec(ma.uordblks)) << std::endl << "uordblks: " << pretty(pbuf, iec(ma.uordblks)) << std::endl
<< "fordblks: " << pretty(iec(ma.fordblks)) << std::endl << "fordblks: " << pretty(pbuf, iec(ma.fordblks)) << std::endl
<< "keepcost: " << pretty(iec(ma.keepcost)) << std::endl << "keepcost: " << pretty(pbuf, iec(ma.keepcost)) << std::endl
; ;
return view(out, buf); return view(out, buf);