fix: memory: protect kernel code

This commit is contained in:
2024-11-26 12:43:09 +01:00
parent 0c280d971b
commit da804296c6
4 changed files with 63 additions and 35 deletions

View File

@ -1,4 +1,6 @@
#pragma once
#define CEIL(x, y) (((x) + (y) - 1) / (y))
#define ARRAY_SIZE(ptr) (sizeof(ptr) / sizeof(ptr[0]))
#define CEIL(x, y) (((x) + (y) - 1) / (y))
#define ARRAY_SIZE(ptr) (sizeof(ptr) / sizeof(ptr[0]))
#define ROUND_CEIL(x, y) (CEIL(x, y) * y)
#define ROUND_FLOOR(x, y) ((x / y) * y)