PMM and liballoc port

This commit is contained in:
2025-12-17 22:42:48 +01:00
parent 13fee12f59
commit f60d8d6861
32 changed files with 1202 additions and 12 deletions

8
kernel/libk/align.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef _KERNEL_LIBK_ALIGN_H
#define _KERNEL_LIBK_ALIGN_H
#define div_align_up(x, div) (((x) + (div) - 1) / (div))
#define align_down(x, a) ((x) & ~((a) - 1))
#define align_up(x, a) (((x) + ((a) - 1)) & ~((a) - 1))
#endif // _KERNEL_LIBK_ALIGN_H