|
libbmb
Modern implementation of STL
|
Allocator-proxy for new/delete operators. More...
#include <allocator.h>
Public Member Functions | |
| template<typename T > | |
| T * | allocate (size_t n) |
| Allocates raw memory for n objects of type T. | |
| template<typename T > | |
| void | deallocate (T *ptr, size_t) noexcept |
| Deallocates memory under ptr. | |
| bool | operator== (const PrimitiveAllocator &) const |
Allocator-proxy for new/delete operators.
This allocator doesn't manage any memory but simply calls new/delete
Allocates raw memory for n objects of type T.
| n | Number of objects to allocate |
| Same | specification as for new operator |
Deallocates memory under ptr.
Takes dummy argument which semantically means "how many objects were allocated at that memory". This is done for unifying interface with any allocator that might need this number.
| ptr | Pointer to the previously allocated memory |
| _ | Dummy argument |
| noexcept |
|
inline |