1 #pragma once 2 3 #include <systypes/base.h> 4 5 #define PAGE_SIZE 4096 6 7 8 9 /* Address arithmetic. */ 10 11 offset_t page(unsigned int n); 12 13 unsigned int page_order(offset_t size); 14 15 offset_t round(offset_t value, offset_t increment); 16 17 offset_t round_multiple(offset_t value, offset_t increment); 18 19 offset_t trunc(offset_t value, offset_t increment); 20 21 offset_t trunc_multiple(offset_t value, offset_t increment); 22 23 offset_t max_multiple(offset_t start, offset_t end, offset_t increment); 24 25 // vim: tabstop=4 expandtab shiftwidth=4