From b8aa6500ea1f819d4cd4d299c0c9e66490864f56 Mon Sep 17 00:00:00 2001 From: Bruce Tan Date: Thu, 18 Apr 2024 17:22:10 +1200 Subject: [PATCH] fix vaddr sizing --- include_winix/winix/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include_winix/winix/mm.h b/include_winix/winix/mm.h index 356247b0..3ad7b78b 100644 --- a/include_winix/winix/mm.h +++ b/include_winix/winix/mm.h @@ -35,7 +35,7 @@ void add_free_mem(void* addr, size_t size); void kprint_slab(); int user_get_free_pages_from(struct proc* who, ptr_t* addr, int size); -#define is_vaddr_accessible(addr, who) is_vaddr_ok((vptr_t*)addr, 1, who) +#define is_vaddr_accessible(addr, who) is_vaddr_ok((vptr_t*)addr, sizeof(vptr_t*), who) #define free_page(page) release_pages((page),PAGE_LEN) #define get_free_page(flags) get_free_pages(PAGE_LEN,(flags)) #define user_get_free_page(who,flags) user_get_free_pages((who), PAGE_LEN ,(flags))