mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Add debug info to ENOMEMs
This commit is contained in:
parent
989b353fbd
commit
27ea25a999
3 changed files with 4 additions and 3 deletions
|
@ -126,7 +126,7 @@ error_code sys_memory_allocate(cpu_thread& cpu, u32 size, u64 flags, vm::ptr<u32
|
|||
// Try to get "physical memory"
|
||||
if (!dct.take(size))
|
||||
{
|
||||
return CELL_ENOMEM;
|
||||
return {CELL_ENOMEM, dct.size - dct.used};
|
||||
}
|
||||
|
||||
if (const auto area = reserve_map(size, align))
|
||||
|
@ -200,7 +200,7 @@ error_code sys_memory_allocate_from_container(cpu_thread& cpu, u32 size, u32 cid
|
|||
|
||||
if (ct.ret)
|
||||
{
|
||||
return ct.ret;
|
||||
return {ct.ret, ct->size - ct->used};
|
||||
}
|
||||
|
||||
if (const auto area = reserve_map(size, align))
|
||||
|
|
|
@ -74,6 +74,7 @@ CellError lv2_memory::on_id_create()
|
|||
{
|
||||
if (!exists && !ct->take(size))
|
||||
{
|
||||
sys_mmapper.error("lv2_memory::on_id_create(): Cannot allocate 0x%x bytes (0x%x available)", size, ct->size - ct->used);
|
||||
return CELL_ENOMEM;
|
||||
}
|
||||
|
||||
|
|
|
@ -507,7 +507,7 @@ error_code _sys_ppu_thread_create(ppu_thread& ppu, vm::ptr<u64> thread_id, vm::p
|
|||
// Try to obtain "physical memory" from the default container
|
||||
if (!dct.take(stack_size))
|
||||
{
|
||||
return CELL_ENOMEM;
|
||||
return {CELL_ENOMEM, dct.size - dct.used};
|
||||
}
|
||||
|
||||
const vm::addr_t stack_base{vm::alloc(stack_size, vm::stack, 4096)};
|
||||
|
|
Loading…
Add table
Reference in a new issue