Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid illegal available_user_memory (<0 or underflow) in sys_memory.cpp #4399

Merged
merged 2 commits into from
May 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 1 addition & 5 deletions rpcs3/Emu/Cell/lv2/sys_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,7 @@ 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
// 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;
mem_info->available_user_memory = ct->size - ct->used; // Available container memory

return CELL_OK;
}