Re: Virtual Memory Goals
Posted: Thu Aug 18, 2016 6:39 pm
To make things more bearable, it should probably be better to make allocations semi-static, meaning that different subsystems would use different areas in the logical/physical address space, as if it was a hard disk partition with special files and areas. For example, we would treat memory-mapped devices with a semi-static style and format to allocate, and the same would happen for regular applications, shared stuff, etc...
In this way we would get to define a lot of details and structure of pages and the whole memory management system beforehand. We would then make it flexible by allowing the smallest and the biggest possible allocations in a single operation.
I also found this in a book; seems very interesting:
In this way we would get to define a lot of details and structure of pages and the whole memory management system beforehand. We would then make it flexible by allowing the smallest and the biggest possible allocations in a single operation.
I also found this in a book; seems very interesting:
If you dynamically allocate your device structure at runtime, use the VMM service _HeapAllocate, which is very similar to malloc. However, if your device structure includes a large buffer (4Kb or larger), you'll want to include only a pointer to the buffer in the device structure itself, and then allocate the large buffer separately using _PageAllocate. The rule is to use _HeapAllocate for small allocations and _PageAllocate for large allocations, where small and large are relative to 4Kb.