Hello All, I was just wondering if anyone has any experience with Memory Management, IA-32 specific, and has any hints or tips to help simulate one.
So far I am able to define classes that emulate a GDT and maps memory and all of the neat stuff, but just looking for any other ideas.
Thanks for anyone who replies!
IA - 32 memory simulator
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:IA - 32 memory simulator
basically, you can create a set of "physical pages" (just bunch of 4K raw bytes that will be pointed to by an array or something) and then
Paging.map() will have to translate the linear address into physical address looking up tables, etc.
However, i wonder why you're trying to emulate this ? would you by any chance be making Yet Another Bochs ?
Code: Select all
class Segment {
linear_t base;
size_t limit;
virtual linear_t map(offset_t off) throws SegmentationFault;
}
read(Segment seg, offset_t off)
{
linear_t la=seg.map(offset);
return phys_page[Paging.map(la)].dd[PageDirector.offset(la)/4]
}
However, i wonder why you're trying to emulate this ? would you by any chance be making Yet Another Bochs ?
Re:IA - 32 memory simulator
The reason i'm doing this is for an assignment for one of my operating system design classes. But the instructions for the lab are very vague, but not completely hard to understand. I was just looking to see if anyone had any information that is noteworthy.