diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-04-18 21:18:59 -0400 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-04-20 20:54:31 -0400 |
| commit | 8f346ab6d960c03826d4a03292c3ff22c9d5911a (patch) | |
| tree | 17879d01b8742dc7243acea323bda01ab4e503fa /kernel/include | |
| parent | more pci devices (diff) | |
| download | comus-8f346ab6d960c03826d4a03292c3ff22c9d5911a.tar.gz comus-8f346ab6d960c03826d4a03292c3ff22c9d5911a.tar.bz2 comus-8f346ab6d960c03826d4a03292c3ff22c9d5911a.zip | |
set mmap limit
Diffstat (limited to 'kernel/include')
| -rw-r--r-- | kernel/include/comus/limits.h | 5 | ||||
| -rw-r--r-- | kernel/include/comus/memory.h | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/kernel/include/comus/limits.h b/kernel/include/comus/limits.h index aedb49e..58cc9cb 100644 --- a/kernel/include/comus/limits.h +++ b/kernel/include/comus/limits.h @@ -9,9 +9,12 @@ /// max number of processes #define N_PROCS 256 -/// max numer of pci devices +/// max nubmer of pci devices #define N_PCI_DEV 256 +/// max memory entires +#define N_MMAP_ENTRY 64 + /// length of terminal buffer #define TERM_MAX_WIDTH 480 #define TERM_MAX_HEIGHT 270 diff --git a/kernel/include/comus/memory.h b/kernel/include/comus/memory.h index ceca4aa..ad049ec 100644 --- a/kernel/include/comus/memory.h +++ b/kernel/include/comus/memory.h @@ -9,11 +9,11 @@ #ifndef _MEMORY_H #define _MEMORY_H +#include <comus/limits.h> #include <stdint.h> #include <stddef.h> #include <stdbool.h> -#define MMAP_MAX_ENTRY 64 #define PAGE_SIZE 4096 #define F_PRESENT 0x001 @@ -34,7 +34,7 @@ struct memory_segment { struct memory_map { uint32_t entry_count; - struct memory_segment entries[MMAP_MAX_ENTRY]; + struct memory_segment entries[N_MMAP_ENTRY]; }; typedef struct mem_ctx_s *mem_ctx_t; |