VITA: don't fail if vm_memblock can't be allocated (#13545)

Failing here is catastrophic because we get no heap, the whole thing
just crashes and leaves nothing in the logs. vm_memblock is not even
used by RetroArch, it's just used by cores with dynarecs, so let the
cores themselves deal with problems if they arise.
This commit is contained in:
notaz 2022-01-25 05:19:00 +02:00 committed by GitHub
parent 86b47b4859
commit 5f2ed6c85a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,6 @@ void _init_vita_heap(void) {
if (_newlib_vm_memblock < 0){
//sceClibPrintf("sceKernelAllocMemBlockForVM failed\n");
goto failure;
}
}else{
_newlib_vm_memblock = 0;
@ -99,8 +98,8 @@ void _free_vita_heap(void) {
// Free the heap memblock to avoid memory leakage.
sceKernelFreeMemBlock(_newlib_heap_memblock);
if(_newlib_vm_memblock)
sceKernelFreeMemBlock(_newlib_vm_memblock);
if (_newlib_vm_memblock > 0)
sceKernelFreeMemBlock(_newlib_vm_memblock);
_newlib_vm_memblock = 0;
_newlib_heap_memblock = 0;