The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
page.h File Reference
#include "common/stdint.h"

Go to the source code of this file.

Macros

#define PAGE_SHIFT   12u
 page size and alignment helpers: the one definition of PAGE_SIZE.
#define PAGE_SIZE   (1u << PAGE_SHIFT)
#define PAGE_OFFSET_MASK   (PAGE_SIZE - 1u)
#define PAGE_ALIGN_DOWN(x)
#define PAGE_ALIGN_UP(x)
#define PAGE_IS_ALIGNED(x)
#define PAGE_COUNT(bytes)

Macro Definition Documentation

◆ PAGE_SHIFT

#define PAGE_SHIFT   12u

page size and alignment helpers: the one definition of PAGE_SIZE.

the hardware page is 4 KiB on both i686 and x86_64.

◆ PAGE_SIZE

#define PAGE_SIZE   (1u << PAGE_SHIFT)

◆ PAGE_OFFSET_MASK

#define PAGE_OFFSET_MASK   (PAGE_SIZE - 1u)

◆ PAGE_ALIGN_DOWN

#define PAGE_ALIGN_DOWN ( x)
Value:
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:19
#define PAGE_OFFSET_MASK
Definition page.h:15

◆ PAGE_ALIGN_UP

#define PAGE_ALIGN_UP ( x)

◆ PAGE_IS_ALIGNED

#define PAGE_IS_ALIGNED ( x)
Value:
(((x) & PAGE_OFFSET_MASK) == 0)

◆ PAGE_COUNT

#define PAGE_COUNT ( bytes)
Value:
(((bytes) + PAGE_OFFSET_MASK) >> PAGE_SHIFT)
#define PAGE_SHIFT
page size and alignment helpers: the one definition of PAGE_SIZE.
Definition page.h:11