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 
9 #include <vitasdk/build_utils.h>
10 #include <psp2kern/types.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 typedef enum SceKernelHeapAttr {
20 
21 typedef struct SceKernelHeapCreateOpt {
23  union { //<! Union for compatibility
25  SceUInt32 uselock; //<! Do not use uselock as it will be deprecated.
26  };
34 
35 typedef struct SceAllocOpt {
36  SceSize size; // 0x14
37  SceSize data04; // maybe len align?
39  int data0C;
40  int data10;
41 } SceAllocOpt;
43 
54 
66 
76 
87 
96 int ksceKernelFreeHeapMemory(SceUID uid, void *ptr);
97 
105 void *ksceKernelAlloc(unsigned int size);
106 
114 int ksceKernelFree(void *ptr);
115 
116 
117 int ksceKernelGetHeapInfo(SceUID heapid, SceUInt32 level, void *pInfo);
118 int ksceKernelGetHeapInfoByPtr(void *pObject, void *pInfo);
119 
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif /* _PSP2KERN_KERNEL_SYSMEM_HEAP_H_ */
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)
SceUInt32 field_14
Definition: heap.h:30
void * ksceKernelAlloc(unsigned int size)
Alloc kernel memory.
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)
VITASDK_BUILD_ASSERT_EQ(0x1C, SceKernelHeapCreateOpt)
int ksceKernelFree(void *ptr)
Free kernel memory.
void * ksceKernelAllocHeapMemory(SceUID uid, SceSize size)
Allocation the specified length of memory from heap.
SceSize size
Definition: heap.h:22
void * ksceKernelAllocHeapMemoryWithOption(SceUID heapid, SceSize len, SceAllocOpt *opt)
Allocation the specified length of memory from heap with option.
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
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