PSPSDK 2024-10-31
Loading...
Searching...
No Matches
pspsysmem_kernel.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspsysmem_kernel.h - Interface to the system memory manager (kernel).
7 *
8 * Copyright (c) 2005 James F.
9 *
10 */
11
12/* Note: Some of the structures, types, and definitions in this file were
13 extrapolated from symbolic debugging information found in the Japanese
14 version of Puzzle Bobble. */
15
16#ifndef PSPSYSMEMKERNEL_H
17#define PSPSYSMEMKERNEL_H
18
19#include <pspkerneltypes.h>
20#include <pspsysmem.h>
21
29#ifdef __cplusplus
30extern "C" {
31#endif
32
34{
36 unsigned int startaddr;
37 unsigned int memsize;
38 unsigned int attr;
40
50
59
68
73
78
83
93int sceKernelSetDdrMemoryProtection(void *addr, int size, int prot);
94
106
116
126
135
144
149 struct _uidControlBlock *type; //(0x8)
150 u32 UID; //(0xC)
151 char *name; //(0x10)
152 unsigned char unk;
153 unsigned char size; // Size in words
158
168
179
186
195
202
210
217
218#ifdef __cplusplus
219}
220#endif
221
224#endif /* PSPSYSMEMKERNEL_H */
void sceKernelSysMemDumpTail(void)
Dump the tail blocks.
SceUID sceKernelCreateHeap(SceUID partitionid, SceSize size, int unk, const char *name)
Create a heap.
void * sceKernelAllocHeapMemory(SceUID heapid, SceSize size)
Allocate a memory block from a heap.
int sceKernelQueryMemoryPartitionInfo(int pid, PspSysmemPartitionInfo *info)
Query the parition information.
int sceKernelGetUIDcontrolBlockWithType(SceUID uid, uidControlBlock *type, uidControlBlock **block)
Get a UID control block on a particular type.
SceSize sceKernelPartitionTotalFreeMemSize(int pid)
Get the total amount of free memory.
int sceKernelGetModel(void)
Get the model of PSP.
void sceKernelSysMemDump(void)
Get the kernel to dump the internal memory table to Kprintf.
int sceKernelFreeHeapMemory(SceUID heapid, void *block)
Free a memory block allocated from a heap.
int sceKernelDeleteUID(SceUID uid)
Delete a UID.
int sceKernelDeleteHeap(SceUID heapid)
Delete a heap.
struct _PspSysmemPartitionInfo PspSysmemPartitionInfo
uidControlBlock * SysMemForKernel_536AD5E1(void)
Get the root of the UID tree (1.5+ only)
SceSize sceKernelPartitionMaxFreeMemSize(int pid)
Get the size of the largest free memory block.
int sceKernelSetDdrMemoryProtection(void *addr, int size, int prot)
Set the protection of a block of ddr memory.
void sceKernelSysMemDumpBlock(void)
Dump the list of memory blocks.
int sceKernelGetUIDcontrolBlock(SceUID uid, uidControlBlock **block)
Get a UID control block.
int sceKernelGetCompiledSdkVersion(void)
Get the SDK version set with sceKernelSetCompiledSdkVersion().
SceSize sceKernelHeapTotalFreeSize(SceUID heapid)
Get the amount of free size of a heap, in bytes.
int sceKernelSetCompiledSdkVersion(int version)
Set the version of the SDK with which the caller was compiled.
struct sockaddr_in __attribute__
Writes gmon.out dump file and stops profiling Called from atexit() handler; will dump out a gmon....
Definition prof.c:169
unsigned int SceSize
Definition pspkerneltypes.h:27
int SceUID
UIDs are used to describe many different kernel objects.
Definition pspkerneltypes.h:24
unsigned char version[2]
Definition psploadcore.h:2
char * name
Definition pspsysmem_kernel.h:4
unsigned char size
Definition pspsysmem_kernel.h:6
struct _uidControlBlock * type
Definition pspsysmem_kernel.h:2
unsigned char unk
Definition pspsysmem_kernel.h:5
float x
Definition psptypes.h:0
uint32_t u32
Definition psptypes.h:41
Definition pspsysmem_kernel.h:34
SceSize size
Definition pspsysmem_kernel.h:35
unsigned int attr
Definition pspsysmem_kernel.h:38
unsigned int memsize
Definition pspsysmem_kernel.h:37
unsigned int startaddr
Definition pspsysmem_kernel.h:36
Structure of a UID control block.
Definition pspsysmem_kernel.h:146
struct _uidControlBlock * nextChild
Definition pspsysmem_kernel.h:148
short attribute
Definition pspsysmem_kernel.h:154
struct _uidControlBlock * type
Definition pspsysmem_kernel.h:149
unsigned char size
Definition pspsysmem_kernel.h:153
struct _uidControlBlock * parent
Definition pspsysmem_kernel.h:147
char * name
Definition pspsysmem_kernel.h:151
u32 UID
Definition pspsysmem_kernel.h:150
struct _uidControlBlock * nextEntry
Definition pspsysmem_kernel.h:155
unsigned char unk
Definition pspsysmem_kernel.h:152