flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > memory |
Author |
|
thomasantony 20 Jan 2005, 12:20
Hi,
I am not a memeory management genius but I think the 4Gig is something caled virtual address space. You can make it point to any physical address using the GDT or by using Paging. For example you can make the kernel start at 2Gb mark but actually load it at the 1 meg mark. This has got something to do with setting the correct base addresses a in the GDT selectors so that the virtual address gets translated to the acorrect physical addresses. You can see something about this in the middle of a tutorial for paging at http://www.osdever.net Thomas Antony |
|||
20 Jan 2005, 12:20 |
|
asmdemon 09 Feb 2005, 03:51
to include som details, look at http://www.osdever.net/tutorials/memory2.php and specifically this:
There are a few problems with the physical memory functions which make them unsuitable for everyday memory allocation like, say, malloc():
They deal with physical addresses, not virtual. This means that they don’t naturally take advantage of a paged architecture, which would allow your kernel to arrange applications’ address spaces independently of the layout of the computers RAM chips. They don’t do much with the memory they allocate: they don't allow things like sharing, swapping to disk, memory-mapped files, integration with the disk cache, etc. |
|||
09 Feb 2005, 03:51 |
|
Scanner 14 May 2005, 12:17
1. Available memory is not switched automatically
2. Access to memory greater than physical will result in reading/writing from/to a void. The CPU will gladly write your data to lets say memory byte at 17M, but when you read the byte at 17M, you will not get back what you wrote (cause their ain't no memory there As for tips on the swap file: 1. Get a storage medium driver working (such as IDE) 2. Read up on how paged mode memory works (refer to the intel pentium system manuals). 3. Write an Interrupt/Exception handler for page faults that will read/write the page file when pages of memory that is not loaded is accessed. 4. Setup and switch on paged mode. O, and btw, good luck cause you will need it. |
|||
14 May 2005, 12:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.