vitasdk
Documentation of the vitasdk
sysmem.h
Go to the documentation of this file.
1 
7 #ifndef _PSP2_KERNEL_SYSMEM_H_
8 #define _PSP2_KERNEL_SYSMEM_H_
9 
10 #include <vitasdk/build_utils.h>
11 #include <psp2/types.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 
19 typedef struct SceKernelAllocMemBlockOpt {
24  const char *strBaseBlockName;
25  int flags;
26  int reserved[10];
29 
31  int size;
32  int size_user;
33  int size_cdram;
37 
38 typedef struct SceKernelMemBlockInfo {
40  void *mappedBase;
47 
53 
54 typedef enum SceKernelMemoryType {
58 
70 
79 
88 int sceKernelGetMemBlockBase(SceUID uid, void **base);
89 
91 
94 
96 int sceKernelSyncVMDomain(SceUID uid, void *data, SceSize size);
99 
100 int sceKernelOpenMemBlock(const char *name, int flags);
102 
109 
116 
124 
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
131 #endif /* _PSP2_KERNEL_SYSMEM_H_ */
132 
uint8_t type
0 = read?, 1 = write?, 2 = feature?, 3 = ?
Definition: bt.h:2
SceSize size
struct size(variable size)
Definition: debug.h:0
int flags
Event flags.
Definition: debug.h:3
SceUInt32 SceKernelMemBlockType
Definition: sysmem.h:16
int sceKernelGetMemBlockBase(SceUID uid, void **base)
Gets the base address of a memory block.
SceKernelMemoryAccessType
Definition: sysmem.h:48
int sceKernelSyncVMDomain(SceUID uid, void *data, SceSize size)
int sceKernelOpenVMDomain(void)
SceSize size
Definition: sysmem.h:20
int sceKernelGetMemBlockInfoByRange(void *base, SceSize size, SceKernelMemBlockInfo *info)
const char * strBaseBlockName
Definition: sysmem.h:24
int sceKernelCloseMemBlock(SceUID uid)
int sceKernelGetModelForCDialog(void)
Get the model number of the device.
int sceKernelOpenMemBlock(const char *name, int flags)
int sceKernelIsPSVitaTV(void)
int sceKernelGetMemBlockInfoByAddr(void *base, SceKernelMemBlockInfo *info)
SceSize mappedSize
Definition: sysmem.h:41
int memoryType
Definition: sysmem.h:42
SceUID sceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, SceSize size, SceKernelAllocMemBlockOpt *opt)
Allocates a new memory block.
SceKernelMemBlockType type
Definition: sysmem.h:44
int size
sizeof(SceKernelFreeMemorySizeInfo)
Definition: sysmem.h:31
int size_user
Free memory size for *_USER_RW memory.
Definition: sysmem.h:32
int sceKernelGetModel(void)
Get the model number of the device.
int sceKernelFreeMemBlock(SceUID uid)
Frees new memory block.
VITASDK_BUILD_ASSERT_EQ(0x40, SceKernelAllocMemBlockOpt)
SceUID sceKernelFindMemBlockByAddr(const void *addr, SceSize size)
SceUInt32 uidBaseBlock
Definition: sysmem.h:23
int reserved[10]
Unknown flags 0x10 or 0x30 for sceKernelOpenMemBlock.
Definition: sysmem.h:26
void * mappedBase
Definition: sysmem.h:40
int flags
Definition: sysmem.h:25
SceUInt32 attr
Definition: sysmem.h:21
int sceKernelGetFreeMemorySize(SceKernelFreeMemorySizeInfo *info)
Get free memory size in bytes.
int sceKernelCloseVMDomain(void)
SceKernelMemoryType
Definition: sysmem.h:54
int size_cdram
Free memory size for USER_CDRAM_RW memory.
Definition: sysmem.h:33
SceSize alignment
Definition: sysmem.h:22
SceUID sceKernelAllocMemBlockForVM(const char *name, SceSize size)
int size_phycont
Free memory size for USER_MAIN_PHYCONT_*_RW memory.
Definition: sysmem.h:34
SceSize size
Definition: sysmem.h:39
SceUInt32 access
Definition: sysmem.h:43
@ SCE_KERNEL_MEMORY_ACCESS_X
Definition: sysmem.h:49
@ SCE_KERNEL_MEMORY_ACCESS_W
Definition: sysmem.h:50
@ SCE_KERNEL_MEMORY_ACCESS_R
Definition: sysmem.h:51
@ SCE_KERNEL_MEMORY_TYPE_NORMAL
Definition: sysmem.h:56
@ SCE_KERNEL_MEMORY_TYPE_NORMAL_NC
Definition: sysmem.h:55
Definition: sysmem.h:19
Definition: sysmem.h:30
Definition: sysmem.h:38
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