9#ifndef MI_BASE_DEFAULT_ALLOCATOR_H
10#define MI_BASE_DEFAULT_ALLOCATOR_H
53 return ::new(std::nothrow)
char[size];
64 virtual void free(
void* memory) {
65 ::delete[]
reinterpret_cast<char*
>(memory);
A default allocator implementation based on global new and delete.
Definition: default_allocator.h:38
The IAllocator interface class supports allocating and releasing memory dynamically.
Definition: iallocator.h:49
Mixin class template for deriving singleton interface implementations, where the reference count is f...
Definition: interface_implement.h:304
virtual void free(void *memory)
Releases the given memory block.
Definition: default_allocator.h:64
static IAllocator * get_instance()
Returns the single instance of the default allocator.
Definition: default_allocator.h:69
virtual void * malloc(Size size)
Allocates a memory block of the given size.
Definition: default_allocator.h:51
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
Allocator interface class to dynamically allocate and deallocate memory.
Mixin class template for deriving interface implementations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: math.h:22