00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef PSPSYSMEMKERNEL_H
00018 #define PSPSYSMEMKERNEL_H
00019
00020 #include <pspkerneltypes.h>
00021 #include <pspsysmem.h>
00022
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00034 typedef struct _PspSysmemPartitionInfo
00035 {
00036 SceSize size;
00037 unsigned int startaddr;
00038 unsigned int memsize;
00039 unsigned int attr;
00040 } PspSysmemPartitionInfo;
00041
00050 int sceKernelQueryMemoryPartitionInfo(int pid, PspSysmemPartitionInfo *info);
00051
00059 SceSize sceKernelPartitionTotalFreeMemSize(int pid);
00060
00068 SceSize sceKernelPartitionMaxFreeMemSize(int pid);
00069
00073 void sceKernelSysMemDump(void);
00074
00078 void sceKernelSysMemDumpBlock(void);
00079
00083 void sceKernelSysMemDumpTail(void);
00084
00094 int sceKernelSetDdrMemoryProtection(void *addr, int size, int prot);
00095
00106 SceUID sceKernelCreateHeap(SceUID partitionid, SceSize size, int unk, const char *name);
00107
00116 void *sceKernelAllocHeapMemory(SceUID heapid, SceSize size);
00117
00126 int sceKernelFreeHeapMemory(SceUID heapid, void *block);
00127
00135 int sceKernelDeleteHeap(SceUID heapid);
00136
00144 SceSize sceKernelHeapTotalFreeSize(SceUID heapid);
00145
00147 struct _uidControlBlock {
00148 struct _uidControlBlock *parent;
00149 struct _uidControlBlock *nextChild;
00150 struct _uidControlBlock *type;
00151 u32 UID;
00152 char *name;
00153 unsigned char unk;
00154 unsigned char size;
00155 short attribute;
00156 struct _uidControlBlock *nextEntry;
00157 } __attribute__((packed));
00158 typedef struct _uidControlBlock uidControlBlock;
00159
00168 int sceKernelGetUIDcontrolBlock(SceUID uid, uidControlBlock** block);
00169
00179 int sceKernelGetUIDcontrolBlockWithType(SceUID uid, uidControlBlock* type, uidControlBlock** block);
00180
00186 uidControlBlock* SysMemForKernel_536AD5E1(void);
00187
00195 int sceKernelDeleteUID(SceUID uid);
00196
00197 #ifdef __cplusplus
00198 }
00199 #endif
00200
00203 #endif