diff --git a/rpcs3/Emu/Cell/lv2/sys_memory.cpp b/rpcs3/Emu/Cell/lv2/sys_memory.cpp index 70d1b1f31c..52a15054cd 100644 --- a/rpcs3/Emu/Cell/lv2/sys_memory.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_memory.cpp @@ -264,7 +264,11 @@ error_code sys_memory_container_get_size(vm::ptr mem_info, u3 } mem_info->total_user_memory = ct->size; // Total container memory - mem_info->available_user_memory = ct->size - ct->used; // Available container memory + // Available container memory, minus a hidden 'buffer' + // This buffer seems to be used by the PS3 OS for c style 'mallocs' + // Todo: Research this more, even though we dont use this buffer, it helps out games when calculating + // expected memory they can use allowing them to boot + mem_info->available_user_memory = ct->size - ct->used - 0x1000000; return CELL_OK; } diff --git a/rpcs3/Emu/Cell/lv2/sys_memory.h b/rpcs3/Emu/Cell/lv2/sys_memory.h index 3a07413acb..beaa008a8d 100644 --- a/rpcs3/Emu/Cell/lv2/sys_memory.h +++ b/rpcs3/Emu/Cell/lv2/sys_memory.h @@ -50,7 +50,9 @@ struct lv2_memory_container static const u32 id_step = 0x1; static const u32 id_count = 16; - const u32 size = 0x10000000; // Amount of "physical" memory in this container + // This is purposely set lower to fake the size of the OS + // Todo: This could change with requested sdk + const u32 size = 0xEC00000; // Amount of "physical" memory in this container atomic_t used{}; // Amount of "physical" memory currently used