Home Segments Index Top Previous Next

397: Practice

Rewrite the constructor shown in Segment 394 such that it keeps track of how much memory it has consumed. Write a companion function, display_bytes_consumed, that displays the number of bytes consumed.