Getting the buffer's memory usage