PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
xsysmem.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16#ifndef __XSYSMEM_H__
17#define __XSYSMEM_H__
18
19#include <sysmem.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#define xsysmem_IMPORTS_start DECLARE_IMPORT_TABLE(sysmem, 1, 2)
26#define xsysmem_IMPORTS_end END_IMPORT_TABLE
27
28typedef struct sysmem_meminfo_
29{
30 int allocation_count;
31 int memsize;
32 sysmem_alloc_table_t *memlist_last;
33 sysmem_alloc_table_t *memlist_first;
35
36typedef struct sysmem_blockinfo_
37{
38 void *block_address;
39 /* Low 8 bits are flags. The rest is the size of this block */
40 /* flags_memsize == 0: block not found in passed in list */
41 /* flags_memsize & 1: passed in list is empty */
42 /* flags_memsize & 2: block is allocated */
43 u32 flags_memsize;
44 void *unused08;
45 sysmem_alloc_table_t *table_info;
47
48typedef union sysmem_info_
49{
50 sysmem_blockinfo_t blockinfo; /* when flag of GetSysMemoryInfo is zero */
51 sysmem_meminfo_t meminfo; /* when flag of GetSysMemoryInfo is nonzero */
53
54void GetSysMemoryInfo(int flag, sysmem_info_t *info);
55
56#define I_GetSysMemoryInfo DECLARE_IMPORT(11, GetSysMemoryInfo)
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* __XSYSMEM_H__ */