This commit is contained in:
red-prig 2022-12-26 20:57:08 +03:00
parent 2b587f91ec
commit 87785626c0

View File

@ -3733,8 +3733,11 @@ begin
res:=addr; res:=addr;
if (g_heap_param.HeapMemoryLock=0) then if (g_heap_param.HeapMemoryLock=0) then
begin begin
ps4_sceKernelMlock(addr,size); //ignore ret _out^:=res;
ret:=0; Exit(0);
end else
begin
ret:=ps4_sceKernelMlock(addr,size);
if (ret=0) then if (ret=0) then
begin begin
_out^:=res; _out^:=res;
@ -3785,18 +3788,16 @@ begin
p_SceLibcIHeap:=msp; p_SceLibcIHeap:=msp;
end; end;
tmp:=p_SceLibcIHeap; p_SceLibcIHeap^.name:='SceLibcIHeap';
tmp^.name:='SceLibcIHeap'; if _INITIAL_LOCK(p_SceLibcIHeap)<>0 then Exit(1);
if _INITIAL_LOCK(tmp)<>0 then Exit(1); p_SceLibcIHeap^.magic :=DEFAULT_MAGIC;
p_SceLibcIHeap^.mflags :=USE_MMAP_BIT or USE_LOCK_BIT or 4;
p_SceLibcIHeap^.page_size :=16384;
p_SceLibcIHeap^.granularity:=65536;
tmp^.magic :=DEFAULT_MAGIC; init_bins(p_SceLibcIHeap);
tmp^.mflags :=USE_MMAP_BIT or USE_LOCK_BIT or 4;
tmp^.page_size :=16384;
tmp^.granularity:=65536;
init_bins(tmp);
// //
@ -3869,21 +3870,20 @@ begin
if (sceLibcHeapDebugFlags and SCE_LIBC_MSPACE_DEBUG_SHORTAGE)<>0 then if (sceLibcHeapDebugFlags and SCE_LIBC_MSPACE_DEBUG_SHORTAGE)<>0 then
begin begin
tmp^.debug_flags:=tmp^.debug_flags or 4; p_SceLibcIHeap^.debug_flags:=p_SceLibcIHeap^.debug_flags or 4;
end; end;
if (sceLibcHeapDebugFlags and SCE_LIBC_MSPACE_IN_ARRAY)<>0 then if (sceLibcHeapDebugFlags and SCE_LIBC_MSPACE_IN_ARRAY)<>0 then
begin begin
tmp^.msp_array_flags:=tmp^.msp_array_flags or 1; p_SceLibcIHeap^.msp_array_flags:=p_SceLibcIHeap^.msp_array_flags or 1;
end; end;
tmp^.ptr_self:=tmp; p_SceLibcIHeap^.ptr_self:=p_SceLibcIHeap;
if (SceLibcInternalHeap=0) then if (SceLibcInternalHeap=0) then
begin begin
tmp:=p_SceLibcIHeap; p_SceLibcIHeap^.name:='SceLibcInternalHeap';
tmp^.name:='SceLibcInternalHeap';
if (sceLibcHeapSize<>0) then if (sceLibcHeapSize<>0) then
begin begin