orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
OrxMemory

Macros

#define orxMEMORY_BARRIER()
#define orxMemory_StackAllocate(x)
#define orxMEMORY_TRACK(TYPE, SIZE, ALLOCATE)

Enumerations

enum  orxMEMORY_TYPE {
  orxMEMORY_TYPE_MAIN = 0 , orxMEMORY_TYPE_AUDIO , orxMEMORY_TYPE_CONFIG , orxMEMORY_TYPE_DEBUG ,
  orxMEMORY_TYPE_PHYSICS , orxMEMORY_TYPE_SYSTEM , orxMEMORY_TYPE_TEMP , orxMEMORY_TYPE_TEXT ,
  orxMEMORY_TYPE_VIDEO , orxMEMORY_TYPE_NUMBER , orxMEMORY_TYPE_NONE = orxENUM_NONE
}

Functions

orxDLLAPI void *orxFASTCALL orxMemory_Allocate (orxU32 _u32Size, orxMEMORY_TYPE _eMemType)
static orxINLINE orxU32 orxMemory_Compare (const void *_pMem1, const void *_pMem2, orxU32 _u32Size)
static orxINLINE void * orxMemory_Copy (void *_pDest, const void *_pSrc, orxU32 _u32Size)
orxDLLAPI void orxFASTCALL orxMemory_Exit ()
orxDLLAPI void orxFASTCALL orxMemory_ExitThread ()
orxDLLAPI void orxFASTCALL orxMemory_Free (void *_pMem)
orxDLLAPI orxU32 orxFASTCALL orxMemory_GetCacheLineSize ()
orxDLLAPI const orxSTRING orxFASTCALL orxMemory_GetTypeName (orxMEMORY_TYPE _eMemType)
orxDLLAPI orxSTATUS orxFASTCALL orxMemory_Init ()
orxDLLAPI orxSTATUS orxFASTCALL orxMemory_InitThread ()
static orxINLINE void * orxMemory_Move (void *_pDest, const void *_pSrc, orxU32 _u32Size)
orxDLLAPI void *orxFASTCALL orxMemory_Reallocate (void *_pMem, orxU32 _u32Size, orxMEMORY_TYPE _eMemType)
static orxINLINE void * orxMemory_Set (void *_pDest, orxU8 _u8Data, orxU32 _u32Size)
orxDLLAPI void orxFASTCALL orxMemory_Setup ()
static orxINLINE void * orxMemory_Zero (void *_pDest, orxU32 _u32Size)

Detailed Description

Memory module Module that handles all low level allocation/free requests

Macro Definition Documentation

◆ orxMEMORY_BARRIER

#define orxMEMORY_BARRIER ( )

Memory barrier macros

Definition at line 70 of file orxMemory.h.

◆ orxMemory_StackAllocate

#define orxMemory_StackAllocate ( x)
Value:
alloca((x))

Memory helpers

Definition at line 89 of file orxMemory.h.

◆ orxMEMORY_TRACK

#define orxMEMORY_TRACK ( TYPE,
SIZE,
ALLOCATE )

Memory tracking macros

Definition at line 81 of file orxMemory.h.

Enumeration Type Documentation

◆ orxMEMORY_TYPE

Memory type

Enumerator
orxMEMORY_TYPE_MAIN 

Main memory type

orxMEMORY_TYPE_AUDIO 

Audio memory type

orxMEMORY_TYPE_CONFIG 

Config memory

orxMEMORY_TYPE_DEBUG 

Debug memory

orxMEMORY_TYPE_PHYSICS 

Physics memory type

orxMEMORY_TYPE_SYSTEM 

System memory type

orxMEMORY_TYPE_TEMP 

Temporary / scratch memory

orxMEMORY_TYPE_TEXT 

Text memory

orxMEMORY_TYPE_VIDEO 

Video memory type

orxMEMORY_TYPE_NUMBER 

Number of memory type

orxMEMORY_TYPE_NONE 

Invalid memory type

Definition at line 94 of file orxMemory.h.

Function Documentation

◆ orxMemory_Allocate()

orxDLLAPI void *orxFASTCALL orxMemory_Allocate ( orxU32 _u32Size,
orxMEMORY_TYPE _eMemType )
extern

Allocates some memory in the system and returns a pointer to it

Parameters
[in]_u32SizeSize of the memory to allocate
[in]_eMemTypeMemory zone where data will be allocated
Returns
returns a pointer to the memory allocated, or orxNULL if an error has occurred

◆ orxMemory_Compare()

orxINLINE orxU32 orxMemory_Compare ( const void * _pMem1,
const void * _pMem2,
orxU32 _u32Size )
static

Compares two parts of memory

Parameters
[in]_pMem1First part to test
[in]_pMem2Second part to test
[in]_u32SizeSize of data to test
Returns
returns a value less than, equal to or greater than 0 if the content of _pMem1 is respectively smaller, equal or greater than _pMem2's

Definition at line 197 of file orxMemory.h.

◆ orxMemory_Copy()

orxINLINE void * orxMemory_Copy ( void * _pDest,
const void * _pSrc,
orxU32 _u32Size )
static

Copies a part of memory into another one

Parameters
[out]_pDestDestination pointer
[in]_pSrcPointer of memory from where data are read
[in]_u32SizeSize of data
Returns
returns a pointer to _pDest
Note
if _pSrc and _pDest overlap, use orxMemory_Move instead

Definition at line 165 of file orxMemory.h.

◆ orxMemory_Exit()

orxDLLAPI void orxFASTCALL orxMemory_Exit ( )
extern

Exits from the memory module

◆ orxMemory_ExitThread()

orxDLLAPI void orxFASTCALL orxMemory_ExitThread ( )
extern

Exits from the memory module for the current thread

◆ orxMemory_Free()

orxDLLAPI void orxFASTCALL orxMemory_Free ( void * _pMem)
extern

Frees some memory allocated with orxMemory_Allocate

Parameters
[in]_pMemPointer to the memory allocated by orx

◆ orxMemory_GetCacheLineSize()

orxDLLAPI orxU32 orxFASTCALL orxMemory_GetCacheLineSize ( )
extern

Gets L1 data cache line size

Returns
Cache line size

◆ orxMemory_GetTypeName()

orxDLLAPI const orxSTRING orxFASTCALL orxMemory_GetTypeName ( orxMEMORY_TYPE _eMemType)
extern

Gets memory type literal name

Parameters
[in]_eMemTypeConcerned memory type
Returns
Memory type name / orxSTRING_EMPTY

◆ orxMemory_Init()

orxDLLAPI orxSTATUS orxFASTCALL orxMemory_Init ( )
extern

Inits the memory module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxMemory_InitThread()

orxDLLAPI orxSTATUS orxFASTCALL orxMemory_InitThread ( )
extern

Inits the memory module for the current thread

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxMemory_Move()

orxINLINE void * orxMemory_Move ( void * _pDest,
const void * _pSrc,
orxU32 _u32Size )
static

Moves a part of memory into another one

Parameters
[out]_pDestDestination pointer
[in]_pSrcPointer of memory from where data are read
[in]_u32SizeSize of data
Returns
returns a pointer to _pDest

Definition at line 181 of file orxMemory.h.

◆ orxMemory_Reallocate()

orxDLLAPI void *orxFASTCALL orxMemory_Reallocate ( void * _pMem,
orxU32 _u32Size,
orxMEMORY_TYPE _eMemType )
extern

Reallocates a previously allocated memory block, with the given new size and returns a pointer to it If possible, it'll keep the current pointer and extend the memory block, if not it'll allocate a new block, copy the data over and deallocates the original block

Parameters
[in]_pMemMemory block to reallocate
[in]_u32SizeSize of the memory to allocate
[in]_eMemTypeMemory zone where data will be allocated
Returns
returns a pointer to the reallocated memory block or orxNULL if an error has occurred

◆ orxMemory_Set()

orxINLINE void * orxMemory_Set ( void * _pDest,
orxU8 _u8Data,
orxU32 _u32Size )
static

Fills a part of memory with _u32Data

Parameters
[out]_pDestDestination pointer
[in]_u8DataValues of the data that will fill the memory
[in]_u32SizeSize of data
Returns
returns a pointer to _pDest

Definition at line 213 of file orxMemory.h.

◆ orxMemory_Setup()

orxDLLAPI void orxFASTCALL orxMemory_Setup ( )
extern

Setups the memory module

◆ orxMemory_Zero()

orxINLINE void * orxMemory_Zero ( void * _pDest,
orxU32 _u32Size )
static

Fills a part of memory with zeroes

Parameters
[out]_pDestDestination pointer
[in]_u32SizeSize of data
Returns
returns a pointer to _pDest

Definition at line 227 of file orxMemory.h.


Generated for orx by doxygen 1.8.11