Documentation of memory
A stateless RawAllocator that allocates memory using the virtual memory allocation functions.
It does not prereserve any memory and will always reserve and commit combined.
|using||is_stateful = std::false_type|
|virtual_memory_allocator (virtual_memory_allocator &&) noexcept|
|virtual_memory_allocator &||operator= (virtual_memory_allocator &&) noexcept|
|void *||allocate_node (std::size_t size, std::size_t alignment)|
|void||deallocate_node (void *node, std::size_t size, std::size_t alignment) noexcept|
|std::size_t||max_node_size () const noexcept|
|std::size_t||max_alignment () const noexcept|
- A RawAllocator allocation function. It uses virtual_memory_reserve followed by virtual_memory_commit for the allocation. The number of pages allocated will be the minimum to hold
sizecontinuous bytes, i.e.
sizewill be rounded up to the next multiple. If debug fences are activated, one additional page before and after the memory will be allocated.
- A pointer to a node, it will never be
nullptr. It will always be aligned on a fence boundary, regardless of the alignment parameter.
- An exception of type out_of_memory or whatever is thrown by its handler if the allocation fails.
- The maximum node size by returning the maximum value.
- The maximum alignment which is the same as the virtual_memory_page_size.
Generated by 1.8.12