Files
linux/tools/testing/memblock/tests/alloc_low_api.h
T
Tianyi Chen 2345d7e354 memblock tests: cover allocations below the low address limit
Add memblock_alloc_low() coverage using the simulator's low address
limit. Exercise aligned allocation, an allocation whose last byte is
immediately below the limit, an alignment constraint that prevents
fitting below it, and fully reserved low memory with high memory still
available.

Run each case with bottom-up and top-down allocation. Check zeroing
and reserved-region accounting as well as returned addresses. Verify
that an unrestricted allocation can use the free high memory after
the low allocation fails.

Document the simulated limit and remove the completed TODO.

Assisted-by: LLM
Signed-off-by: Tianyi Chen <[email protected]>
Link: https://patch.msgid.link/142ab1025fd1e4b5dcd2a1591b964626ebce9d23.1788997523.git.hi@tychen.cc
Signed-off-by: Mike Rapoport (Microsoft) <[email protected]>
2026-09-10 13:10:20 +03:00

10 lines
175 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _MEMBLOCK_ALLOC_LOW_H
#define _MEMBLOCK_ALLOC_LOW_H
#include "common.h"
int memblock_alloc_low_checks(void);
#endif