MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
standard_allocator.hpp 文件参考

MSTL标准分配器 更多...

#include "MSTL/core/exception/exception.hpp"
#include <new>
standard_allocator.hpp 的引用(Include)关系图:

浏览该文件的源代码.

class  standard_allocator< T >
 标准分配器类 更多...
struct  standard_allocator< T >::rebind< U >
 重新绑定模板 更多...

类型定义

template<typename T>
using allocator = standard_allocator<T>
 标准分配器别名

函数

template<size_t Align>
MSTL_ALLOC_OPTIMIZE MSTL_CONSTEXPR20 void * allocate (const _INNER alloc_size_t bytes)
 内存分配函数
template<size_t Align>
MSTL_CONSTEXPR20 void deallocate (void *ptr, _INNER alloc_size_t bytes) noexcept
 内存释放函数
template<typename T, typename U>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator== (const standard_allocator< T > &, const standard_allocator< U > &) noexcept
 比较两个分配器是否相等
template<typename T, typename U>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator!= (const standard_allocator< T > &, const standard_allocator< U > &) noexcept
 比较两个分配器是否不等

详细描述

MSTL标准分配器

此文件提供了标准分配器实现, 用于管理动态内存分配和释放,支持不同对齐要求和编译器优化。

在文件 standard_allocator.hpp 中定义.