sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
heaplib.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
17#ifndef __HEAPLIB_H__
18#define __HEAPLIB_H__
19
20#include <types.h>
21#include <irx.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27extern void *CreateHeap(int heapblocksize, int flag);
28extern void DeleteHeap(void *heap);
29extern void *AllocHeapMemory(void *heap, size_t nbytes);
30extern int FreeHeapMemory(void *heap, void *ptr);
31extern int HeapTotalFreeSize(void *heap);
32
33extern void HeapPrepare(void* mem, int size);
34extern int HeapChunkSize(void* chunk);
35
36#define heaplib_IMPORTS_start DECLARE_IMPORT_TABLE(heaplib, 1, 1)
37#define heaplib_IMPORTS_end END_IMPORT_TABLE
38
39#define I_CreateHeap DECLARE_IMPORT(4, CreateHeap)
40#define I_DeleteHeap DECLARE_IMPORT(5, DeleteHeap)
41#define I_AllocHeapMemory DECLARE_IMPORT(6, AllocHeapMemory)
42#define I_FreeHeapMemory DECLARE_IMPORT(7, FreeHeapMemory)
43#define I_HeapTotalFreeSize DECLARE_IMPORT(8, HeapTotalFreeSize)
44#define I_HeapPrepare DECLARE_IMPORT(11, HeapPrepare)
45#define I_HeapChunkSize DECLARE_IMPORT(15, HeapChunkSize)
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif /* __HEAPLIB_H__ */
Definition mem.c:336