|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
内存分配器的实现 更多...
类 | |
| class | neforce::standard_allocator< T > |
| 标准分配器类 更多... | |
类型定义 | |
| template<typename T> | |
| using | neforce::allocator = standard_allocator<T> |
| 标准分配器别名 | |
函数 | |
| template<size_t Align> | |
| constexpr void * | neforce::allocate (const inner::alloc_size_t bytes) |
| 内存分配函数 | |
| template<size_t Align> | |
| constexpr void | neforce::deallocate (void *ptr, inner::alloc_size_t bytes) noexcept |
| 内存释放函数 | |
| template<typename T, typename U> | |
| constexpr bool | neforce::operator== (const standard_allocator< T > &, const standard_allocator< U > &) noexcept |
| 比较两个分配器是否相等 | |
| template<typename T, typename U> | |
| constexpr bool | neforce::operator!= (const standard_allocator< T > &, const standard_allocator< U > &) noexcept |
| 比较两个分配器是否不等 | |
内存分配器的实现
| using neforce::allocator = standard_allocator<T> |
|
constexpr |
内存分配函数
| Align | 对齐要求 |
| bytes | 要分配的字节数 |
内存分配的统一入口。
在文件 standard_allocator.hpp 第 177 行定义.
引用了 allocate() , 以及 is_constant_evaluated().
被这些函数引用 allocate().
|
constexprnoexcept |
内存释放函数
| Align | 对齐要求 |
| ptr | 要释放的内存指针 |
| bytes | 要释放的字节数 |
内存释放的统一入口。
在文件 standard_allocator.hpp 第 281 行定义.
引用了 deallocate() , 以及 is_constant_evaluated().
被这些函数引用 deallocate().
|
nodiscardconstexprnoexcept |
比较两个分配器是否不等
| T | 第一个分配器元素类型 |
| U | 第二个分配器元素类型 |
在文件 standard_allocator.hpp 第 417 行定义.
引用了 operator!=().
|
nodiscardconstexprnoexcept |
比较两个分配器是否相等
| T | 第一个分配器元素类型 |
| U | 第二个分配器元素类型 |
在文件 standard_allocator.hpp 第 405 行定义.
引用了 operator==().