Skip to content
Commit f6e70786 authored by Alexandru Elisei's avatar Alexandru Elisei
Browse files

lib/alloc_phys: Remove allocation accounting



The page allocator has better allocation tracking and is used by all
architectures, while the physical allocator is never used for allocating
memory.

Simplify the physical allocator by removing allocation accounting. This
accomplishes two things:

1. It makes the allocator more useful, as the warning that was displayed
for each allocation after the 256th is removed. That can become an issue
if the allocator is used for creating the translation tables, for example.

2. It becomes trivial to add cache maintenance for the internal structures
that the physical allocator maintains, which are now only four static
variables.

phys_alloc_show() has received a slight change in the way it displays the
use and free regions: the end of the region is now non-inclusive, to allow
phys_alloc_show() to express that no memory has been used, or no memory is
free: in both cases, the start and the end adresses are equal.

Reviewed-by: default avatarAndrew Jones <andrew.jones@linux.dev>
Signed-off-by: Alexandru Elisei's avatarAlexandru Elisei <alexandru.elisei@arm.com>
parent 1e3356b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment