mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-09-07 05:11:19 +01:00

Now that the allocator cannot run out of nodes in the middle of an allocation, the code can be simplified greatly. First it moves bytes from the beginning and/or end of the node to new nodes in the free list as necessary. These new nodes are inserted into the free list in address order. Then it moves the original node to the used list. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org> Tested-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250617032306.1494528-4-samuel.holland@sifive.com Signed-off-by: Anup Patel <anup@brainfault.org>