memblock region iteration can now be bounded to a certain memory range

This commit is contained in:
2022-12-29 10:19:57 +00:00
parent e922a776c3
commit 84efc44710
3 changed files with 57 additions and 15 deletions

View File

@@ -24,6 +24,17 @@
typedef uint64_t memblock_index_t;
typedef enum memblock_region_status {
/* Used in memblock.memory regions, indicates that the memory region exists */
MEMBLOCK_MEMORY = 0,
/* Used in memblock.reserved regions, indicates that the memory region was reserved
* by a call to memblock_alloc() */
MEMBLOCK_ALLOC,
/* Used in memblock.reserved regions, indicates that the memory region was reserved
* by a call to memblock_reserve() */
MEMBLOCK_RESERVED,
} memblock_region_status_t;
typedef struct memblock_region {
/* the address of the first byte that makes up the region */
uintptr_t base;