drivers/base/memory.c: Optimize allocated_bytes_show()
The allocated_bytes_show() function currently iterates through
all of the free pages in the movable zone to calculate the amount
of free space in a single block. This is not efficient, as it ends
up making it so that pages that don't belong in a block get inspected.
Thus, inspect only pages that belong to a particular block when
calculating the amount of memory used in the block.
Change-Id: Ib641718e47a289e6594bf8e04e48eb4404dda1ba
Signed-off-by:
Isaac J. Manjarres <isaacm@codeaurora.org>
Loading
Please register or sign in to comment