mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 19:55:46 +00:00
VM_Manager: Align allocated memory to 256bytes
This commit ensures that all backing memory allocated for the Guest CPU is aligned to 256 bytes. This due to how gpu memory works and the heavy constraints it has in the alignment of physical memory.
This commit is contained in:
parent
a0571bcccd
commit
5bce8f62ac
15 changed files with 131 additions and 36 deletions
|
@ -143,7 +143,7 @@ static bool LoadNroImpl(Kernel::Process& process, const std::vector<u8>& data,
|
|||
}
|
||||
|
||||
// Build program image
|
||||
std::vector<u8> program_image(PageAlignSize(nro_header.file_size));
|
||||
Kernel::PhysicalMemory program_image(PageAlignSize(nro_header.file_size));
|
||||
std::memcpy(program_image.data(), data.data(), program_image.size());
|
||||
if (program_image.size() != PageAlignSize(nro_header.file_size)) {
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue