Fix: mman behavior

This commit is contained in:
2025-04-15 14:20:52 +08:00
parent d3d316a994
commit f25758031a
12 changed files with 98 additions and 37 deletions

View File

@@ -19,7 +19,11 @@ typedef enum :uint8_t {
typedef struct {
page_state_t state;
uint64_t maxsz;
// when state == PAGE_ALLOCATED or PAGE_RESERVED, size = 0
// when state == PAGE_FREE, size = r - l
// when state == PAGE_DIVIDED, size = LCH->size | RCH->size
uint64_t size;
} page_header_t;
void mman_init();

View File

@@ -20,7 +20,7 @@ typedef struct timer {
task_t data;
} timer_t;
void add_task(task_t task);
void add_timer_task(task_t task);
void timer_irq_handler(void);

View File

@@ -6,6 +6,8 @@
uint32_t msb32(uint32_t);
uint64_t msb64(uint64_t);
uint64_t lsb64(uint64_t);
uint32_t hton32(const uint32_t);
uint32_t ntoh32(const uint32_t);