Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR_Allocator.h File Reference
#include "OVR_Types.h"
Include dependency graph for OVR_Allocator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  OVR::Allocator
 
class  OVR::Allocator_SingletonSupport< D >
 
struct  OVR::Allocator_SingletonSupport< D >::AllocContainer
 
class  OVR::DefaultAllocator
 
class  OVR::NewOverrideBase
 

Namespaces

 OVR
 

Macros

#define __PLACEMENT_NEW_INLINE
 
#define OVR_MEMORY_REDEFINE_NEW_IMPL(class_name, check_delete)
 
#define OVR_MEMORY_DEFINE_PLACEMENT_NEW
 
#define OVR_MEMORY_CHECK_DELETE_NONE(class_name, p)
 
#define OVR_MEMORY_REDEFINE_NEW(class_name)   OVR_MEMORY_REDEFINE_NEW_IMPL(class_name, OVR_MEMORY_CHECK_DELETE_NONE)
 
#define OVR_REALLOC(p, s)   OVR::Allocator::GetInstance()->Realloc((p),(s))
 
#define OVR_FREE(p)   OVR::Allocator::GetInstance()->Free((p))
 
#define OVR_ALLOC_ALIGNED(s, a)   OVR::Allocator::GetInstance()->AllocAligned((s),(a))
 
#define OVR_FREE_ALIGNED(p)   OVR::Allocator::GetInstance()->FreeAligned((p))
 
#define OVR_ALLOC(s)   OVR::Allocator::GetInstance()->Alloc((s))
 
#define OVR_ALLOC_DEBUG(s, f, l)   OVR::Allocator::GetInstance()->Alloc((s))
 

Functions

OVR_FORCE_INLINE void * operator new (OVR::UPInt n, void *ptr)
 
OVR_FORCE_INLINE void operator delete (void *, void *)
 
template<class T >
OVR_FORCE_INLINE T * OVR::Construct (void *p)
 
template<class T >
OVR_FORCE_INLINE T * OVR::Construct (void *p, const T &source)
 
template<class T , class S >
OVR_FORCE_INLINE T * OVR::ConstructAlt (void *p, const S &source)
 
template<class T , class S1 , class S2 >
OVR_FORCE_INLINE T * OVR::ConstructAlt (void *p, const S1 &src1, const S2 &src2)
 
template<class T >
OVR_FORCE_INLINE void OVR::ConstructArray (void *p, UPInt count)
 
template<class T >
OVR_FORCE_INLINE void OVR::ConstructArray (void *p, UPInt count, const T &source)
 
template<class T >
OVR_FORCE_INLINE void OVR::Destruct (T *pobj)
 
template<class T >
OVR_FORCE_INLINE void OVR::DestructArray (T *pobj, UPInt count)
 

Macro Definition Documentation

#define __PLACEMENT_NEW_INLINE

Definition at line 53 of file OVR_Allocator.h.

#define OVR_ALLOC (   s)    OVR::Allocator::GetInstance()->Alloc((s))

Definition at line 321 of file OVR_Allocator.h.

#define OVR_ALLOC_ALIGNED (   s,
 
)    OVR::Allocator::GetInstance()->AllocAligned((s),(a))

Definition at line 314 of file OVR_Allocator.h.

#define OVR_ALLOC_DEBUG (   s,
  f,
 
)    OVR::Allocator::GetInstance()->Alloc((s))

Definition at line 322 of file OVR_Allocator.h.

#define OVR_FREE (   p)    OVR::Allocator::GetInstance()->Free((p))

Definition at line 313 of file OVR_Allocator.h.

#define OVR_FREE_ALIGNED (   p)    OVR::Allocator::GetInstance()->FreeAligned((p))

Definition at line 315 of file OVR_Allocator.h.

#define OVR_MEMORY_CHECK_DELETE_NONE (   class_name,
 
)

Definition at line 88 of file OVR_Allocator.h.

#define OVR_MEMORY_DEFINE_PLACEMENT_NEW
Value:
void* operator new (UPInt n, void *ptr) { OVR_UNUSED(n); return ptr; } \
void operator delete (void *ptr, void *ptr2) { OVR_UNUSED2(ptr,ptr2); }
#define OVR_UNUSED(a)
size_t UPInt
Definition: OVR_Types.h:218
#define OVR_UNUSED2(a1, a2)

Definition at line 83 of file OVR_Allocator.h.

#define OVR_MEMORY_REDEFINE_NEW (   class_name)    OVR_MEMORY_REDEFINE_NEW_IMPL(class_name, OVR_MEMORY_CHECK_DELETE_NONE)

Definition at line 91 of file OVR_Allocator.h.

#define OVR_MEMORY_REDEFINE_NEW_IMPL (   class_name,
  check_delete 
)
Value:
void* operator new(UPInt sz) \
{ void *p = OVR_ALLOC_DEBUG(sz, __FILE__, __LINE__); return p; } \
void* operator new(UPInt sz, const char* file, int line) \
{ void* p = OVR_ALLOC_DEBUG(sz, file, line); OVR_UNUSED2(file, line); return p; } \
void operator delete(void *p) \
{ check_delete(class_name, p); OVR_FREE(p); } \
void operator delete(void *p, const char*, int) \
{ check_delete(class_name, p); OVR_FREE(p); }
size_t UPInt
Definition: OVR_Types.h:218
#define OVR_FREE(p)
#define OVR_ALLOC_DEBUG(s, f, l)
#define OVR_UNUSED2(a1, a2)

Definition at line 73 of file OVR_Allocator.h.

#define OVR_REALLOC (   p,
 
)    OVR::Allocator::GetInstance()->Realloc((p),(s))

Definition at line 312 of file OVR_Allocator.h.

Function Documentation

OVR_FORCE_INLINE void operator delete ( void *  ,
void *   
)

Definition at line 60 of file OVR_Allocator.h.

OVR_FORCE_INLINE void* operator new ( OVR::UPInt  n,
void *  ptr 
)

Definition at line 59 of file OVR_Allocator.h.