Om
1.0.0
A universal framework for multimedia simulation
|
A class that allocates aligned memory from the global memory system. More...
#include <omAllocator.h>
Public Member Functions | |
virtual UByte * | allocate (Size numBytes) |
Allocate the specified number of bytes and return a pointer to the uninitialized memory. More... | |
virtual void | deallocate (void *pointer) |
Free the previously allocated memory block pointed to by the specified pointer. More... | |
Public Member Functions inherited from om::util::Allocator | |
virtual | ~Allocator () |
Destroy this allocator. More... | |
Static Public Member Functions | |
template<typename T > | |
static T * | allocate (Size count=Size(1), Size alignment=defaultAlignment) |
Allocate unitialized memory for the specified number of objects of type T. More... | |
template<typename T > | |
static void | deallocate (T *pointer) |
Free the previously allocated memory block pointed to by the specified pointer. More... | |
Static Public Member Functions inherited from om::util::Allocator | |
template<typename T > | |
static T * | allocate (Size count=Size(1)) |
Allocate unitialized memory for the specified number of objects of type T. More... | |
template<typename T > | |
static void | deallocate (T *pointer) |
Free the previously allocated memory block pointed to by the specified pointer. More... | |
template<typename T > | |
static void | construct (T *object) |
Call the default constructor of an object. More... | |
template<typename T , typename P1 > | |
static void | construct (T *object, const P1 &p1) |
Call the constructor of an object with 1 constructor parameter. More... | |
template<typename T , typename P1 , typename P2 > | |
static void | construct (T *object, const P1 &p1, const P2 &p2) |
Call the constructor of an object with 2 constructor parameters. More... | |
template<typename T , typename P1 , typename P2 , typename P3 > | |
static void | construct (T *object, const P1 &p1, const P2 &p2, const P3 &p3) |
Call the constructor of an object with 3 constructor parameters. More... | |
template<typename T , typename P1 , typename P2 , typename P3 , typename P4 > | |
static void | construct (T *object, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) |
Call the constructor of an object with 4 constructor parameters. More... | |
template<typename T , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 > | |
static void | construct (T *object, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5) |
Call the constructors of an array of objects with 5 constructor parameters. More... | |
template<typename T , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 > | |
static void | construct (T *object, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) |
Call the constructor of an object with 6 constructor parameters. More... | |
template<typename T , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 > | |
static void | construct (T *object, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, const P7 &p7) |
Call the constructor of an object with 7 constructor parameters. More... | |
template<typename T , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8 > | |
static void | construct (T *object, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, const P7 &p7, const P8 &p8) |
Call the constructor of an object with 8 constructor parameters. More... | |
template<typename T , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8 , typename P9 > | |
static void | construct (T *object, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, const P7 &p7, const P8 &p8, const P9 &p9) |
Call the constructor of an object with 9 constructor parameters. More... | |
template<typename T , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8 , typename P9 , typename P10 > | |
static void | construct (T *object, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, const P7 &p7, const P8 &p8, const P9 &p9, const P10 &p10) |
Call the constructor of an object with 10 constructor parameters. More... | |
template<typename T , typename SizeType > | |
static void | constructArray (T *objects, SizeType number) |
Call the default constructors of an array of objects. More... | |
template<typename T , typename SizeType , typename P1 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1) |
Call the constructors of an array of objects with 1 constructor parameter. More... | |
template<typename T , typename SizeType , typename P1 , typename P2 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1, const P2 &p2) |
Call the constructors of an array of objects with 2 constructor parameters. More... | |
template<typename T , typename SizeType , typename P1 , typename P2 , typename P3 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1, const P2 &p2, const P3 &p3) |
Call the constructors of an array of objects with 3 constructor parameters. More... | |
template<typename T , typename SizeType , typename P1 , typename P2 , typename P3 , typename P4 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) |
Call the constructors of an array of objects with 4 constructor parameters. More... | |
template<typename T , typename SizeType , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5) |
Call the constructors of an array of objects with 5 constructor parameters. More... | |
template<typename T , typename SizeType , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) |
Call the constructors of an array of objects with 6 constructor parameters. More... | |
template<typename T , typename SizeType , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, const P7 &p7) |
Call the constructors of an array of objects with 7 constructor parameters. More... | |
template<typename T , typename SizeType , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, const P7 &p7, const P8 &p8) |
Call the constructors of an array of objects with 8 constructor parameters. More... | |
template<typename T , typename SizeType , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8 , typename P9 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, const P7 &p7, const P8 &p8, const P9 &p9) |
Call the constructors of an array of objects with 9 constructor parameters. More... | |
template<typename T , typename SizeType , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8 , typename P9 , typename P10 > | |
static void | constructArray (T *objects, SizeType number, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, const P7 &p7, const P8 &p8, const P9 &p9, const P10 &p10) |
Call the constructors of an array of objects with 10 constructor parameters. More... | |
template<typename T > | |
static void | destruct (T *object) |
Call the destructor on an object of the templated type. More... | |
template<typename T , typename SizeType > | |
static void | destructArray (T *objects, SizeType number) |
Call the destructors on an array of objects of the templated type. More... | |
template<typename T , typename SizeType > | |
static void | copyArray (T *destination, const T *source, SizeType number) |
Copy an array of objects by calling the placement-new copy constructor for each object. More... | |
template<typename T , typename SizeType > | |
static void | moveArray (T *destination, T *source, SizeType number) |
Copy an array of objects from the source to destination with placement new, calling destructors on the source. More... | |
A class that allocates aligned memory from the global memory system.
|
inlinevirtual |
Allocate the specified number of bytes and return a pointer to the uninitialized memory.
Reimplemented from om::util::Allocator.
|
inlinevirtual |
Free the previously allocated memory block pointed to by the specified pointer.
Reimplemented from om::util::Allocator.
|
inlinestatic |
Allocate unitialized memory for the specified number of objects of type T.
|
inlinestatic |
Free the previously allocated memory block pointed to by the specified pointer.