Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAaronLopezGarcia committed Dec 23, 2023
1 parent 5db9467 commit 11b4a70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 4 additions & 4 deletions core/systemctrl/src/oe_malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ int oe_mallocinit(void)
}

void* oe_malloc(size_t size){
SceUID uid = sceKernelAllocPartitionMemory(PSP_MEMORY_PARTITION_KERNEL, "", PSP_SMEM_High, size+sizeof(u32), NULL);
int* ptr = sceKernelGetBlockHeadAddr(uid);
SceUID uid = sceKernelAllocPartitionMemory(PSP_MEMORY_PARTITION_KERNEL, "", PSP_SMEM_High, size+sizeof(SceUID), NULL);
SceUID* ptr = sceKernelGetBlockHeadAddr(uid);
ptr[0] = uid;
return &(ptr[1]);
}

void oe_free(int* ptr){
int uid = ptr[-1];
void oe_free(void* ptr){
SceUID uid = ((SceUID*)ptr)[-1];
sceKernelFreePartitionMemory(uid);
}

Expand Down
3 changes: 0 additions & 3 deletions core/systemctrl/src/rebootex.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ void backupRebootBuffer(void)
// Copy ARK runtime Config
if (IS_ARK_CONFIG(ARK_CONFIG))
memcpy(ark_config, ARK_CONFIG, sizeof(ARKConfig));

// clearup SE Config
memset(&se_config, 0, sizeof(SEConfig));

// Flush Cache
flushCache();
Expand Down

0 comments on commit 11b4a70

Please sign in to comment.