Virtual memory and dlmalloc

This commit is contained in:
2025-08-14 01:49:04 +02:00
parent 95832bb3a7
commit b470fb03da
10 changed files with 6618 additions and 6 deletions

19
kernel/vmm/vmm.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef VMM_VMM_H_
#define VMM_VMM_H_
#include <stddef.h>
#include "bitmap/bitmap.h"
#include "spinlock/spinlock.h"
typedef struct {
SpinLock spinlock;
BitMap self;
} VirtMem;
extern VirtMem VIRT_MEM;
void vmm_init(void);
void *vmm_alloc(size_t pages);
void vmm_free(void *ptr, size_t pages);
#endif // VMM_VMM_H_