vitasdk
Documentation of the vitasdk
heap.h
Go to the documentation of this file.
1
6#ifndef _PSP2KERN_KERNEL_SYSMEM_HEAP_H_
7#define _PSP2KERN_KERNEL_SYSMEM_HEAP_H_
8
10#include <psp2kern/types.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
20
21typedef struct SceKernelHeapCreateOpt {
23 union { //<! Union for compatibility
25 SceUInt32 uselock; //<! Do not use uselock as it will be deprecated.
26 };
34
35typedef struct SceAllocOpt {
36 SceSize size; // 0x14
37 SceSize data04; // maybe len align?
39 int data0C;
40 int data10;
43
54
66
76
87
96int ksceKernelFreeHeapMemory(SceUID uid, void *ptr);
97
105void *ksceKernelAlloc(unsigned int size);
106
114int ksceKernelFree(void *ptr);
115
116
117int ksceKernelGetHeapInfo(SceUID heapid, SceUInt32 level, void *pInfo);
118int ksceKernelGetHeapInfoByPtr(void *pObject, void *pInfo);
119
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif /* _PSP2KERN_KERNEL_SYSMEM_HEAP_H_ */
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
SceSize size
struct size(variable size)
Definition debug.h:0
SceSize align
Definition heap.h:38
SceSize size
Definition heap.h:36
SceUInt32 field_8
Definition heap.h:27
int ksceKernelGetHeapInfoByPtr(void *pObject, void *pInfo)
void * ksceKernelAllocHeapMemoryWithOption(SceUID heapid, SceSize len, SceAllocOpt *opt)
Allocation the specified length of memory from heap with option.
SceUInt32 field_14
Definition heap.h:30
SceUInt32 uselock
Definition heap.h:25
int data0C
Definition heap.h:39
SceUInt32 field_C
Definition heap.h:28
int ksceKernelFreeHeapMemory(SceUID uid, void *ptr)
Free allocated memory.
int ksceKernelGetHeapInfo(SceUID heapid, SceUInt32 level, void *pInfo)
int ksceKernelFree(void *ptr)
Free kernel memory.
void * ksceKernelAlloc(unsigned int size)
Alloc kernel memory.
SceSize size
Definition heap.h:22
SceUInt32 attr
Definition heap.h:24
SceUInt32 memtype
Definition heap.h:29
int data10
Definition heap.h:40
int ksceKernelDeleteHeap(SceUID uid)
Delete heap area.
SceUInt32 field_18
Definition heap.h:31
SceKernelHeapAttr
Definition heap.h:16
void * ksceKernelAllocHeapMemory(SceUID uid, SceSize size)
Allocation the specified length of memory from heap.
SceUID ksceKernelCreateHeap(const char *name, SceSize size, SceKernelHeapCreateOpt *opt)
Create heap area.
SceSize data04
Definition heap.h:37
@ SCE_KERNEL_HEAP_ATTR_HAS_AUTO_EXTEND
Definition heap.h:17
@ SCE_KERNEL_HEAP_ATTR_HAS_MEMORY_TYPE
Definition heap.h:18
Definition heap.h:35
Definition heap.h:21
unsigned int SceSize
Definition types.h:56
int SceUID
UIDs are used to describe many different kernel objects.
Definition types.h:90
uint32_t SceUInt32
Definition types.h:45