Enumerations |
| enum | orxMEMORY_TYPE {
orxMEMORY_TYPE_MAIN = 0,
orxMEMORY_TYPE_VIDEO,
orxMEMORY_TYPE_SPRITE,
orxMEMORY_TYPE_BACKGROUND,
orxMEMORY_TYPE_PALETTE,
orxMEMORY_TYPE_CONFIG,
orxMEMORY_TYPE_TEXT,
orxMEMORY_TYPE_TEMP,
orxMEMORY_TYPE_NUMBER,
orxMEMORY_TYPE_NONE = orxENUM_NONE
} |
Functions |
| orxDLLAPI void *orxFASTCALL | orxMemory_Allocate (orxU32 _u32Size, orxMEMORY_TYPE _eMemType) |
| orxDLLAPI orxU32 orxFASTCALL | orxMemory_Compare (const void *_pMem1, const void *_pMem2, orxU32 _u32Size) |
| orxDLLAPI void *orxFASTCALL | orxMemory_Copy (void *_pDest, const void *_pSrc, orxU32 _u32Size) |
| orxDLLAPI void orxFASTCALL | orxMemory_Exit () |
| orxDLLAPI void orxFASTCALL | orxMemory_Free (void *_pMem) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxMemory_Init () |
| orxDLLAPI void *orxFASTCALL | orxMemory_Move (void *_pDest, void *_pSrc, orxU32 _u32Size) |
| orxDLLAPI void *orxFASTCALL | orxMemory_Reallocate (void *_pMem, orxU32 _u32Size) |
| orxDLLAPI void *orxFASTCALL | orxMemory_Set (void *_pDest, orxU8 _u8Data, orxU32 _u32Size) |
| orxDLLAPI void orxFASTCALL | orxMemory_Setup () |
| orxDLLAPI void *orxFASTCALL | orxMemory_Zero (void *_pDest, orxU32 _u32Size) |
Detailed Description
Memory module Module that handles all low level allocation/free requests
Enumeration Type Documentation
- Enumerator:
| orxMEMORY_TYPE_MAIN |
Main memory type
|
| orxMEMORY_TYPE_VIDEO |
Video memory type
|
| orxMEMORY_TYPE_SPRITE |
Sprite memory type
|
| orxMEMORY_TYPE_BACKGROUND |
Background memory type
|
| orxMEMORY_TYPE_PALETTE |
Palette memory type
|
| orxMEMORY_TYPE_CONFIG |
Config memory
|
| orxMEMORY_TYPE_TEXT |
Text memory
|
| orxMEMORY_TYPE_TEMP |
Temporary / scratch memory
|
| orxMEMORY_TYPE_NUMBER |
Number of memory type
|
| orxMEMORY_TYPE_NONE |
Invalid memory type
|
Definition at line 52 of file orxMemory.h.
Function Documentation
| orxDLLAPI void* orxFASTCALL orxMemory_Allocate |
( |
orxU32 |
_u32Size, |
|
|
orxMEMORY_TYPE |
_eMemType |
|
) |
| |
Allocates a portion of memory in the system and returns a pointer on it
- Parameters:
-
| [in] | _u32Size | Size of the memory to allocate |
| [in] | _eMemType | Memory zone where datas will be allocated |
- Returns:
- returns a pointer on the memory allocated, or orxNULL if an error has occured
| orxDLLAPI orxU32 orxFASTCALL orxMemory_Compare |
( |
const void * |
_pMem1, |
|
|
const void * |
_pMem2, |
|
|
orxU32 |
_u32Size |
|
) |
| |
Compares two portions of memory
- Parameters:
-
| [in] | _pMem1 | First potion to test |
| [in] | _pMem2 | Second portion to test |
| [in] | _u32Size | Size of data to test |
- Returns:
- returns a value less, equals or greater that 0 if _pMem1 is respectively smaller, equal or greater than _pMem2
| orxDLLAPI void* orxFASTCALL orxMemory_Copy |
( |
void * |
_pDest, |
|
|
const void * |
_pSrc, |
|
|
orxU32 |
_u32Size |
|
) |
| |
Copies a portion of memory into another one
- Parameters:
-
| [out] | _pDest | Destination pointer |
| [in] | _pSrc | Pointer of memory from where data are read |
| [in] | _u32Size | Size of data |
- Returns:
- returns a pointer on _pDest
- Note:
- if _pSrc and _pDest overlap, use orxMemory_Move instead
| orxDLLAPI void orxFASTCALL orxMemory_Exit |
( |
) |
|
Exits from the memory module
| orxDLLAPI void orxFASTCALL orxMemory_Free |
( |
void * |
_pMem ) |
|
Frees a portion of memory allocated with orxMemory_Allocate
- Parameters:
-
| [in] | _pMem | Pointer on the memory allocated by orx |
| orxDLLAPI orxSTATUS orxFASTCALL orxMemory_Init |
( |
) |
|
Inits the memory module
- Returns:
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
| orxDLLAPI void* orxFASTCALL orxMemory_Move |
( |
void * |
_pDest, |
|
|
void * |
_pSrc, |
|
|
orxU32 |
_u32Size |
|
) |
| |
Moves a portion of memory into another one
- Parameters:
-
| [out] | _pDest | Destination pointer |
| [in] | _pSrc | Pointer of memory from where data are read |
| [in] | _u32Size | Size of data |
- Returns:
- returns a pointer on _pDest
| orxDLLAPI void* orxFASTCALL orxMemory_Reallocate |
( |
void * |
_pMem, |
|
|
orxU32 |
_u32Size |
|
) |
| |
Reallocates a portion of memory if the already allocated memory is not suffisant.
- Parameters:
-
| [in] | _pMem | Memory to reallocate. |
| [in] | _u32Size | Wanted size. |
- Returns:
- The pointer reallocated.
| orxDLLAPI void* orxFASTCALL orxMemory_Set |
( |
void * |
_pDest, |
|
|
orxU8 |
_u8Data, |
|
|
orxU32 |
_u32Size |
|
) |
| |
Fills a portion of memory with _u32Data
- Parameters:
-
| [out] | _pDest | Destination pointer |
| [in] | _u8Data | Values of the data that will fill the memory |
| [in] | _u32Size | Size of data |
- Returns:
- returns a pointer on _pDest
| orxDLLAPI void orxFASTCALL orxMemory_Setup |
( |
) |
|
| orxDLLAPI void* orxFASTCALL orxMemory_Zero |
( |
void * |
_pDest, |
|
|
orxU32 |
_u32Size |
|
) |
| |
Fills a portion of memory with zeroes
- Parameters:
-
| [out] | _pDest | Destination pointer |
| [in] | _u32Size | Size of data |
- Returns:
- returns a pointer on _pDest