Virtual address mapping through MMU

StridingDragon
Posts: 46
Joined: Fri Aug 02, 2019 11:59 pm

Virtual address mapping through MMU

Postby StridingDragon » Fri Jan 31, 2020 1:02 am

Is it possible to allocate some internal RAM and then tell the MMU, I want to access this block through the address 0xA000_0000, for example? The internal memory is too fragmented for me to allocate a large buffer I need, so I was hoping I might create a fantasy address space and tell the MMU to map all access to that space to memory that I've previously allocated. Is that doable?

Alternatively, would it be possible to tell the MMU/allocator to "give me 64k of internal RAM and map it to the address space starting at 0xA000_0000, regardless of where it really is"?

Either way would allow me to allocate smaller chunks of internal memory and then treat them as if they were one large block, residing at my made-up address space. Thoughts, ideas, anyone?

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Virtual address mapping through MMU

Postby ESP_Sprite » Fri Jan 31, 2020 12:14 pm

No, sorry, that's not possible; internal memory cannot be remapped. The easier way is to allocate the block at the start of the program so it cannot get fragmented.

Who is online

Users browsing this forum: No registered users and 151 guests