This module contains routines to manage heaps of memory.  
More...
| 
Functions | 
| int | sceKernelQueryMemoryPartitionInfo (int pid, PspSysmemPartitionInfo *info) | 
|  | Query the parition information. 
 | 
| SceSize | sceKernelPartitionTotalFreeMemSize (int pid) | 
|  | Get the total amount of free memory. 
 | 
| SceSize | sceKernelPartitionMaxFreeMemSize (int pid) | 
|  | Get the size of the largest free memory block. 
 | 
| void | sceKernelSysMemDump (void) | 
|  | Get the kernel to dump the internal memory table to Kprintf. 
 | 
| void | sceKernelSysMemDumpBlock (void) | 
|  | Dump the list of memory blocks. 
 | 
| void | sceKernelSysMemDumpTail (void) | 
|  | Dump the tail blocks. 
 | 
| int | sceKernelSetDdrMemoryProtection (void *addr, int size, int prot) | 
|  | Set the protection of a block of ddr memory. 
 | 
| 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 | sceKernelFreeHeapMemory (SceUID heapid, void *block) | 
|  | Free a memory block allocated from a heap. 
 | 
| int | sceKernelDeleteHeap (SceUID heapid) | 
|  | Delete a heap. 
 | 
| SceSize | sceKernelHeapTotalFreeSize (SceUID heapid) | 
|  | Get the amount of free size of a heap, in bytes. 
 | 
| struct _uidControlBlock | __attribute__ ((packed)) | 
| int | sceKernelGetUIDcontrolBlock (SceUID uid, uidControlBlock **block) | 
|  | Get a UID control block. 
 | 
| int | sceKernelGetUIDcontrolBlockWithType (SceUID uid, uidControlBlock *type, uidControlBlock **block) | 
|  | Get a UID control block on a particular type. 
 | 
| uidControlBlock * | SysMemForKernel_536AD5E1 (void) | 
|  | Get the root of the UID tree (1.5+ only) 
 | 
| int | sceKernelDeleteUID (SceUID uid) | 
|  | Delete a UID. 
 | 
| int | sceKernelGetModel (void) | 
|  | Get the model of PSP. 
 | 
Detailed Description
This module contains routines to manage heaps of memory. 
Typedef Documentation
Function Documentation
Allocate a memory block from a heap. 
- Parameters
- 
  
    | heapid | - The UID of the heap to allocate from. |  | size | - The number of bytes to allocate. |  
 
- Returns
- The address of the allocated memory block, or NULL on error. 
 
 
Create a heap. 
- Parameters
- 
  
    | partitionid | - The UID of the partition where allocate the heap. |  | size | - The size in bytes of the heap. |  | unk | - Unknown, probably some flag or type, pass 1. |  | name | - Name assigned to the new heap. |  
 
- Returns
- The UID of the new heap, or if less than 0 an error. 
 
 
      
        
          | int sceKernelDeleteHeap | ( | SceUID | heapid | ) |  | 
      
 
Delete a heap. 
- Parameters
- 
  
    | heapid | - The UID of the heap to delete. |  
 
- Returns
- 0 on success, < 0 on error. 
 
 
      
        
          | int sceKernelDeleteUID | ( | SceUID | uid | ) |  | 
      
 
Delete a UID. 
- Parameters
- 
  
  
- Returns
- 0 on success 
 
 
      
        
          | int sceKernelFreeHeapMemory | ( | SceUID | heapid, | 
        
          |  |  | void * | block | 
        
          |  | ) |  |  | 
      
 
Free a memory block allocated from a heap. 
- Parameters
- 
  
    | heapid | - The UID of the heap where block belongs. |  | block | - The block of memory to free from the heap. |  
 
- Returns
- 0 on success, < 0 on error. 
 
 
      
        
          | int sceKernelGetModel | ( | void |  | ) |  | 
      
 
Get the model of PSP. 
- Returns
- <= 0 original, 1 slim 
 
 
Get a UID control block. 
- Parameters
- 
  
    | uid | - The UID to find |  | block | - Pointer to hold the pointer to the block |  
 
- Returns
- 0 on success 
 
 
Get a UID control block on a particular type. 
- Parameters
- 
  
    | uid | - The UID to find |  | type | - Pointer to the type UID block |  | block | - Pointer to hold the pointer to the block |  
 
- Returns
- 0 on success 
 
 
Get the amount of free size of a heap, in bytes. 
- Parameters
- 
  
    | heapid | - The UID of the heap |  
 
- Returns
- the free size of the heap, in bytes. < 0 on error. 
 
 
      
        
          | SceSize sceKernelPartitionMaxFreeMemSize | ( | int | pid | ) |  | 
      
 
Get the size of the largest free memory block. 
- Parameters
- 
  
  
- Returns
- The size of the largest free memory block, in bytes. 
 
 
      
        
          | SceSize sceKernelPartitionTotalFreeMemSize | ( | int | pid | ) |  | 
      
 
Get the total amount of free memory. 
- Parameters
- 
  
  
- Returns
- The total amount of free memory, in bytes. 
 
 
Query the parition information. 
- Parameters
- 
  
  
- Returns
- 0 on success. 
 
 
      
        
          | int sceKernelSetDdrMemoryProtection | ( | void * | addr, | 
        
          |  |  | int | size, | 
        
          |  |  | int | prot | 
        
          |  | ) |  |  | 
      
 
Set the protection of a block of ddr memory. 
- Parameters
- 
  
    | addr | - Address to set protection on |  | size | - Size of block |  | prot | - Protection bitmask |  
 
- Returns
- < 0 on error 
 
 
      
        
          | void sceKernelSysMemDump | ( | void |  | ) |  | 
      
 
Get the kernel to dump the internal memory table to Kprintf. 
 
 
      
        
          | void sceKernelSysMemDumpBlock | ( | void |  | ) |  | 
      
 
Dump the list of memory blocks. 
 
 
      
        
          | void sceKernelSysMemDumpTail | ( | void |  | ) |  | 
      
 
 
Get the root of the UID tree (1.5+ only) 
- Returns
- Pointer to the UID tree root