From f0248ad1724f9fbdd372db4da8ee8f956ae6aacd Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sun, 24 Aug 2025 16:05:30 -0400 Subject: libc heap impl --- lib/libjove/include/arch/x86_64/pager.h | 3 +++ lib/libjove/include/memory.h | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 lib/libjove/include/memory.h (limited to 'lib/libjove/include') diff --git a/lib/libjove/include/arch/x86_64/pager.h b/lib/libjove/include/arch/x86_64/pager.h index 7e47ed1..2a53a07 100644 --- a/lib/libjove/include/arch/x86_64/pager.h +++ b/lib/libjove/include/arch/x86_64/pager.h @@ -9,4 +9,7 @@ extern KernelObjectPageMap __jove_pagemap; JoveError jove_pager_ensure_for(KernelObjectPageMap *map, uintptr_t vptr); #define jove_pager_ensure(vptr) jove_pager_ensure_for(&__jove_pagemap, vptr) +int jove_pager_exists_for(KernelObjectPageMap *map, uintptr_t vptr); +#define jove_pager_exists(vptr) jove_pager_exists_for(&__jove_pagemap, vptr); + #endif diff --git a/lib/libjove/include/memory.h b/lib/libjove/include/memory.h new file mode 100644 index 0000000..9d4ce1d --- /dev/null +++ b/lib/libjove/include/memory.h @@ -0,0 +1,15 @@ +#ifndef _LIBJOVE_MEMORY_H +#define _LIBJOVE_MEMORY_H 1 + +#include + +#ifdef __x86_64__ +#include +#define jove_mem_ensure(vptr) jove_pager_ensure(vptr) +#define jove_mem_exists(vptr) jove_pager_exists(vptr) +#endif + +JoveError jove_mem_ensure_range(uintptr_t start, uintptr_t end); +JoveError jove_mem_ensure_w(uintptr_t start, size_t pages); + +#endif -- cgit v1.2.1