sys_memory: Lower maximum size for memory block to fake OS size - Report available memory minus another fake block that can be used for the OS

This commit is contained in:
Jake 2017-11-30 21:01:09 -06:00 committed by kd-11
parent c424652b43
commit 17cf24d0ed
2 changed files with 8 additions and 2 deletions

View file

@ -264,7 +264,11 @@ error_code sys_memory_container_get_size(vm::ptr<sys_memory_info_t> 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;
}