HenryCase wrote:
Karlos wrote:
How do you take, say, 16 4KiB pages scattered across the 4G physical address space that an application requested and originally thought was one contiguous 64KiB lump of memory and tell it "here is where your data was" ?
By arranging it into a 64KiB lump before you give memory control back to the program.
Assuming you could do this, do you have any idea how complex the algorithm required to sort all the scattered physical blocks into contiguous lumps that reflect what the code originally allocated and ensuring pointers everywhere in the system are updated? That's not even including the overhead of copying pages of memory around.
Give me an example of when you'd use a pointer to address more than one memory location so I can explain how its done.
Any code that walks arrays, traverses containers, manipulates strings, etc.