1#include <math/align.h>
2#include <math/div.h>
3#include <mem/page.h>
4#include <test/static_assert.h>
5
6static_assert_size(struct page, 8);
7static_assert_size(struct page_table, 4096);
8static_assert(PAGE_SIZE == 4096, "PAGE_SIZE must be 4096");
9static_assert(PAGE_4K_SHIFT == 12, "PAGE_4K_SHIFT must be 12");
10
11static_assert(DIV_ROUND_UP(0, 4) == 0, "DIV_ROUND_UP(0, 4) == 0");
12static_assert(DIV_ROUND_UP(1, 4) == 1, "DIV_ROUND_UP(1, 4) == 1");
13static_assert(DIV_ROUND_UP(4, 4) == 1, "DIV_ROUND_UP(4, 4) == 1");
14static_assert(DIV_ROUND_UP(5, 4) == 2, "DIV_ROUND_UP(5, 4) == 2");
15
16static_assert(ALIGN_UP(4095, 4096) == 4096, "ALIGN_UP(4095, 4096) == 4096");
17static_assert(ALIGN_DOWN(4097, 4096) == 4096, "ALIGN_DOWN(4097, 4096) == 4096");
18