From 274765f7daa3cc1094f9f26196fcf2b9a5289ee2 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 5 Dec 2014 15:06:17 +0100 Subject: Corrections : - replace size_t by void* in many places - correct bug in region freeing code --- kernel/include/region.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'kernel/include/region.h') diff --git a/kernel/include/region.h b/kernel/include/region.h index 1628370..bc26bfe 100644 --- a/kernel/include/region.h +++ b/kernel/include/region.h @@ -15,18 +15,19 @@ #define REGION_T_HW 0x00002000 // used for hardware access struct region_info; -typedef void (*page_fault_handler_t)(pagedir_t *pd, struct region_info *r, size_t addr); +typedef void (*page_fault_handler_t)(pagedir_t *pd, struct region_info *r, void* addr); typedef struct region_info { - size_t addr, size; + void* addr; + size_t size; uint32_t type; page_fault_handler_t pf; } region_info_t; void region_allocator_init(void* kernel_data_end); -size_t region_alloc(size_t size, uint32_t type, page_fault_handler_t pf); // returns 0 on error -region_info_t *find_region(size_t addr); -void region_free(size_t addr); +void* region_alloc(size_t size, uint32_t type, page_fault_handler_t pf); // returns 0 on error +region_info_t *find_region(void* addr); +void region_free(void* addr); void dbg_print_region_stats(); -- cgit v1.2.3