diff options
Diffstat (limited to 'src/kernel/include')
-rw-r--r-- | src/kernel/include/region.h | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/kernel/include/region.h b/src/kernel/include/region.h index 2593dba..f4562ac 100644 --- a/src/kernel/include/region.h +++ b/src/kernel/include/region.h @@ -1,25 +1,7 @@ #pragma once -// Kernel virtual memory region allocator +#include <region_alloc.h> -// This is entirely thread-safe - -#include <sys.h> -#include <paging.h> - -struct region_info; - -typedef struct region_info { - void* addr; - size_t size; - char* type; -} region_info_t; - -void region_allocator_init(void* kernel_data_end); - -void* region_alloc(size_t size, char* type); // returns 0 on error -region_info_t *find_region(void* addr); -void region_free(void* addr); // some functions for freeing regions and frames // region_free_unmap_free : deletes a region and frees all frames that were mapped in it @@ -27,6 +9,6 @@ void region_free_unmap_free(void* addr); // region_free_unmap : deletes a region and unmaps all frames that were mapped in it, without freeing them void region_free_unmap(void* addr); -void dbg_print_region_info(); +bool alloc_map_single_frame(void* addr); // used by kernel region allocator /* vim: set ts=4 sw=4 tw=0 noet :*/ |