Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yifanlu/taiHEN
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanlu committed Nov 25, 2017
2 parents 5b2c8f2 + b156865 commit 89ba642
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const size_t slab_pagesize = 0x1000;

/**
* @brief Allocates a raw chunk of memory
*
*
* Returns a pointer that's kernel writable and another one that's executable.
*
* @param[in] pid PID to allocate memory for
Expand Down Expand Up @@ -109,7 +109,7 @@ static SceUID sce_exe_alloc(SceUID pid, void **ptr, uintptr_t *exe_addr, SceUID
memset(&opt, 0, sizeof(opt));
opt.size = sizeof(opt);
opt.attr = 0x1000040;
opt.mirror_blkid = *exe_res;
opt.mirror_blockid = *exe_res;
res = ksceKernelAllocMemBlock("taimirror", SCE_KERNEL_MEMBLOCK_TYPE_RW_UNK0, 0, &opt);
LOG("ksceKernelAllocMemBlock(taimirror): 0x%08X", res);
if (res < 0) {
Expand Down Expand Up @@ -247,7 +247,7 @@ void *slab_alloc(struct slab_chain *const sch, uintptr_t *exe_addr)
/* no empty or partial slabs available, create a new one */
SceUID write_res, exe_res;
uintptr_t exe_data;
if ((write_res = sce_exe_alloc(sch->pid, (void **)&sch->partial, &exe_data,
if ((write_res = sce_exe_alloc(sch->pid, (void **)&sch->partial, &exe_data,
&exe_res, sch->slabsize, sch->pages_per_alloc)) < 0) {
*exe_addr = 0;
return sch->partial = NULL;
Expand Down

0 comments on commit 89ba642

Please sign in to comment.