Kernel: MB 0 to MB 8 is allocated for the kernel and its components. (Length=8MB)
Memory Manager and its components: MB 8 to MB 12 (Length=4 MB)
Page Directory Entries: MB 12 to MB12+4KB (Length=4KB)
Page Table Entries: MB12+4KB to MB 16+4KB (Length = 4MB)
Free space for core device drivers: MB16+4KB to MB20 (Length = 4MB-4KB)
With this scheme, the Operating System would take 20 MB of RAM and the rest will be allowed to be allocated and/or deallocated by the memory manager and its related components. I have not yet coded my memory allocator and deallocator so I have not yet given MB8 to MB12 any schemes yet. I’d really appreciate it if you guys could tell me whether this is an optimal way of dividing the memory or not. Thank in advance.
Code: Select all
; 8 Megabytes are allocated for the Kernel 0x00000000 ... 0x007FFFFF (8 MB)
; 4 Megabytes are allocated for Memory Manager Maps 0x00800000 ... 0x00BFFFFF (4 MB)
; 4 Kilobytes are allocated for Page Directory Entries 0x00C00000 ... 0x00C00FFF (4 KB)
; 4 Megabytes are allocated for Page Table Entries 0x00C01000 ... 0x01000FFF (4 MB)
; (4 Megabytes - 4 Kilobytes) of free space 0x01001000 ... 0x013FFFFF (4 MB-4KB)