From 89841b3563c2d3b2c5b2f38f8b873643c406934a Mon Sep 17 00:00:00 2001 From: Chloe M Date: Sat, 11 Jul 2026 04:47:58 -0400 Subject: [PATCH] sdk: ptapi: Add memory management API Signed-off-by: Chloe M --- sdk/head/ptapi/ptmm.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sdk/head/ptapi/ptmm.h diff --git a/sdk/head/ptapi/ptmm.h b/sdk/head/ptapi/ptmm.h new file mode 100644 index 0000000..27bc7e8 --- /dev/null +++ b/sdk/head/ptapi/ptmm.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2026, Chloe M. + * Provided under the BSD-3 clause. + * + * Description: Memory management API + * Author: Chloe M. + */ + +#ifndef _PTAPI_PTMM_H_ +#define _PTAPI_PTMM_H_ 1 + +#include + +/* Protection flags type */ +typedef USHORT MM_PROT; + +/* Page-level protection flags */ +#define PAGE_READ 0x00 +#define PAGE_WRITE BIT(0) +#define PAGE_EXEC BIT(1) +#if defined(_KERNEL) +#define PAGE_USER BIT(2) +#endif /* !_KERNEL */ + +#endif /* !_PTAPI_PTMM_H_ */