![]() |
OGRE-Next 3.0.0
Object-Oriented Graphics Rendering Engine
|
This file configures Ogre's memory allocators. More...
#include "OgreMemoryAllocatedObject.h"
#include "OgreHeaderPrefix.h"
#include "OgreMemorySTLAllocator.h"
#include "OgreHeaderSuffix.h"
Namespaces | |
namespace | Ogre |
bswapNN may be defined as macros in <sys/endian.h> or <sys/bswap.h> | |
Macros | |
#define | OGRE_ALLOC_DEBUG_METADATA |
#define | OGRE_ALLOC_T(T, count, category) |
#define | OGRE_ALLOC_T_SIMD(T, count, category) |
#define | OGRE_DELETE delete |
#define | OGRE_DELETE_ARRAY_T(ptr, T, count, category) |
#define | OGRE_DELETE_T(ptr, T, category) |
#define | OGRE_FREE(ptr, category) |
#define | OGRE_FREE_ALIGN(ptr, category, align) |
Free the memory allocated with either OGRE_MALLOC_ALIGN or OGRE_ALLOC_T_ALIGN. | |
#define | OGRE_FREE_SIMD(ptr, category) |
Free the memory allocated with either OGRE_MALLOC_SIMD or OGRE_ALLOC_T_SIMD. | |
#define | OGRE_MALLOC(bytes, category) |
#define | OGRE_MALLOC_ALIGN(bytes, category, align) |
Allocate a block of raw memory aligned to user defined boundaries, and indicate the category of usage. | |
#define | OGRE_MALLOC_SIMD(bytes, category) |
Allocate a block of raw memory aligned to SIMD boundaries, and indicate the category of usage. | |
#define | OGRE_NEW new |
new / delete for classes deriving from AllocatedObject (alignment determined by per-class policy) | |
#define | OGRE_NEW_ARRAY_T(T, count, category) |
#define | OGRE_NEW_T(T, category) |
Allocate space for one primitive type, external type or non-virtual type with constructor parameters. | |
Enumerations | |
enum | Ogre::MemoryCategory { Ogre::MEMCATEGORY_GENERAL = 0 , Ogre::MEMCATEGORY_GEOMETRY = 1 , Ogre::MEMCATEGORY_ANIMATION = 2 , Ogre::MEMCATEGORY_SCENE_CONTROL = 3 , Ogre::MEMCATEGORY_SCENE_OBJECTS = 4 , Ogre::MEMCATEGORY_RESOURCE = 5 , Ogre::MEMCATEGORY_SCRIPTING = 6 , Ogre::MEMCATEGORY_RENDERSYS = 7 , Ogre::MEMCATEGORY_COUNT = 8 } |
A set of categories that indicate the purpose of a chunk of memory being allocated. More... | |
Functions | |
template<typename T > | |
T * | Ogre::constructN (T *basePtr, size_t count) |
Utility function for constructing an array of objects with placement new, without using new[] (which allocates an undocumented amount of extra memory and so isn't appropriate for custom allocators). | |
This file configures Ogre's memory allocators.
You can modify this file to alter the allocation routines used for Ogre's main objects.
When customising memory allocation, all you need to do is provide one or more custom allocation policy classes. These classes need to implement:
Policies are then used as implementations for the wrapper classes and macros which call them. AllocatedObject for example provides the hooks to override the new and delete operators for a class and redirect the functionality to the policy. STLAllocator is a class which is provided to STL containers in order to hook up allocation of the containers members to the allocation policy.
#define OGRE_ALLOC_DEBUG_METADATA |
#define OGRE_ALLOC_T | ( | T, | |
count, | |||
category ) |
Referenced by Ogre::v1::VertexCacheProfiler::VertexCacheProfiler(), and Ogre::AxisAlignedBox::getAllCorners().
#define OGRE_ALLOC_T_SIMD | ( | T, | |
count, | |||
category ) |
#define OGRE_DELETE delete |
Referenced by Ogre::v1::D3D11HardwareBufferManager::~D3D11HardwareBufferManager(), Ogre::v1::DefaultHardwareBufferManager::~DefaultHardwareBufferManager(), Ogre::v1::GL3PlusDefaultHardwareBufferManager::~GL3PlusDefaultHardwareBufferManager(), Ogre::v1::GL3PlusHardwareBufferManager::~GL3PlusHardwareBufferManager(), Ogre::v1::GLES2DefaultHardwareBufferManager::~GLES2DefaultHardwareBufferManager(), Ogre::v1::GLES2HardwareBufferManager::~GLES2HardwareBufferManager(), Ogre::v1::MetalHardwareBufferManager::~MetalHardwareBufferManager(), Ogre::v1::VulkanHardwareBufferManager::~VulkanHardwareBufferManager(), Ogre::APKFileSystemArchiveFactory::destroyInstance(), Ogre::FileSystemArchiveFactory::destroyInstance(), Ogre::SimplePageContentCollectionFactory::destroyInstance(), Ogre::ZipArchiveFactory::destroyInstance(), and Ogre::Lod0Stripifier::StripLod0Vertices().
#define OGRE_DELETE_ARRAY_T | ( | ptr, | |
T, | |||
count, | |||
category ) |
#define OGRE_DELETE_T | ( | ptr, | |
T, | |||
category ) |
Referenced by Ogre::SPFMDeleteT::operator()(), and Ogre::Any::reset().
#define OGRE_FREE | ( | ptr, | |
category ) |
Referenced by Ogre::AxisAlignedBox::~AxisAlignedBox(), and Ogre::v1::VertexCacheProfiler::~VertexCacheProfiler().
#define OGRE_FREE_ALIGN | ( | ptr, | |
category, | |||
align ) |
Free the memory allocated with either OGRE_MALLOC_ALIGN or OGRE_ALLOC_T_ALIGN.
Category is required to be restated to ensure the matching policy is used
#define OGRE_FREE_SIMD | ( | ptr, | |
category ) |
Free the memory allocated with either OGRE_MALLOC_SIMD or OGRE_ALLOC_T_SIMD.
Category is required to be restated to ensure the matching policy is used
Referenced by Ogre::FreeOnDestructor::~FreeOnDestructor(), Ogre::ImageCodec2::ImageData2::~ImageData2(), Ogre::LightListInfo::~LightListInfo(), Ogre::RawSimdUniquePtr< T, M_CATEGORY >::~RawSimdUniquePtr(), and Ogre::RawSimdUniquePtr< T, M_CATEGORY >::operator=().
#define OGRE_MALLOC | ( | bytes, | |
category ) |
#define OGRE_MALLOC_ALIGN | ( | bytes, | |
category, | |||
align ) |
Allocate a block of raw memory aligned to user defined boundaries, and indicate the category of usage.
#define OGRE_MALLOC_SIMD | ( | bytes, | |
category ) |
Allocate a block of raw memory aligned to SIMD boundaries, and indicate the category of usage.
Referenced by Ogre::RawSimdUniquePtr< T, M_CATEGORY >::operator=().
#define OGRE_NEW new |
new / delete for classes deriving from AllocatedObject (alignment determined by per-class policy)
Referenced by Ogre::BoxEmitterFactory::createEmitter(), Ogre::CylinderEmitterFactory::createEmitter(), Ogre::EllipsoidEmitterFactory::createEmitter(), Ogre::HollowEllipsoidEmitterFactory::createEmitter(), Ogre::PointEmitterFactory::createEmitter(), Ogre::RingEmitterFactory::createEmitter(), Ogre::APKFileSystemArchiveFactory::createInstance(), Ogre::APKZipArchiveFactory::createInstance(), Ogre::EmbeddedZipArchiveFactory::createInstance(), Ogre::FileSystemArchiveFactory::createInstance(), Ogre::SimplePageContentCollectionFactory::createInstance(), Ogre::ZipArchiveFactory::createInstance(), Ogre::v1::BorderPanelOverlayElementFactory::createOverlayElement(), Ogre::v1::PanelOverlayElementFactory::createOverlayElement(), and Ogre::v1::TextAreaOverlayElementFactory::createOverlayElement().
#define OGRE_NEW_ARRAY_T | ( | T, | |
count, | |||
category ) |
#define OGRE_NEW_T | ( | T, | |
category ) |
Allocate space for one primitive type, external type or non-virtual type with constructor parameters.
Referenced by Ogre::AnyNumeric::AnyNumeric().