mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
PPU Loader: Consume Executable Memory
This commit is contained in:
parent
0724fa3aa9
commit
45112dbce8
1 changed files with 5 additions and 1 deletions
|
@ -2155,6 +2155,8 @@ bool ppu_load_exec(const ppu_exec_object& elf, bool virtual_load, const std::str
|
||||||
|
|
||||||
const auto old_process_info = g_ps3_process_info;
|
const auto old_process_info = g_ps3_process_info;
|
||||||
|
|
||||||
|
u32 segs_size = 0;
|
||||||
|
|
||||||
// Allocate memory at fixed positions
|
// Allocate memory at fixed positions
|
||||||
for (const auto& prog : elf.progs)
|
for (const auto& prog : elf.progs)
|
||||||
{
|
{
|
||||||
|
@ -2249,6 +2251,8 @@ bool ppu_load_exec(const ppu_exec_object& elf, bool virtual_load, const std::str
|
||||||
{
|
{
|
||||||
ppu_register_range(addr, size);
|
ppu_register_range(addr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
segs_size += utils::align<u32>(size + (addr % 0x10000), 0x10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2773,7 +2777,7 @@ bool ppu_load_exec(const ppu_exec_object& elf, bool virtual_load, const std::str
|
||||||
|
|
||||||
ppu->gpr[1] -= stack_alloc_size;
|
ppu->gpr[1] -= stack_alloc_size;
|
||||||
|
|
||||||
ensure(g_fxo->get<lv2_memory_container>().take(primary_stacksize));
|
ensure(g_fxo->get<lv2_memory_container>().take(primary_stacksize + segs_size));
|
||||||
|
|
||||||
ppu->cmd_push({ppu_cmd::initialize, 0});
|
ppu->cmd_push({ppu_cmd::initialize, 0});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue