Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6d600f8 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres
Browse files

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: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent c65a75e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment