Cogs.Foundation
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
Allocator.h File Reference
#include "../FoundationBase.h"
#include "../Platform/Atomic.h"
#include <OsoMemoryProfiler/CogsMemoryProfile.h>
#include <utility>

Go to the source code of this file.

Classes

class  Cogs::Memory::Allocator
 Base allocator implementation. More...
 

Namespaces

namespace  Cogs
 Main Cogs namespace.
 
namespace  Cogs::Memory
 

Functions

template<typename T >
T * Cogs::Memory::create (Allocator *allocator)
 Allocate storage and construct an object of the type T with the given allocator.
 
template<typename T , typename... Args>
T * Cogs::Memory::create (Allocator *allocator, Args &&... args)
 Allocate storage and construct an object of the type T with the given allocator, using the given arguments.
 
template<typename T >
void Cogs::Memory::destroy (T *t, Allocator *allocator)
 Destroy the given object and free the allocated memory using the given allocator.
 

Variables

constexpr size_t Cogs::Memory::kDefaultAlignment = 8