Function CE::Memory::format_bytes
Defined in File bytes.h
Function Documentation
-
inline std::string CE::Memory::format_bytes(const std::size_t bytes)
Formats an owned, one-decimal binary-unit size string.
See also
- Parameters:
bytes – Unsigned byte count; this does not query an allocation or residency.
- Returns:
Decimal magnitude followed by bytes/KiB/MiB and later binary suffixes. Exact powers of 1024 start the next unit. Unit selection precedes rounding, so a value near a boundary can display 1024.0 in the preceding unit. Zero formats as “0.0 bytes”; formatting/allocation failures propagate.