|
Cogs.Foundation
|
Default page type that maintains storage for elements of type T in the pool page and provides pooled allocations for this type. More...
#include <ConfigurablePagedPool.h>
Public Member Functions | |
| DefaultPage ()=default | |
| Default constructor. | |
| DefaultPage (DefaultContext &context, size_t pageSize) | |
| Construct a new page with the given page size. | |
| T * | getHead () |
| Retrieve a pointer to the first element of the page. | |
Private Attributes | |
| std::vector< uint8_t > | bytes |
| Backing storage bytes. | |
Default page type that maintains storage for elements of type T in the pool page and provides pooled allocations for this type.
| T | Type of element to store in the pool page. For each page, sizeof(T) * pageSize bytes will be reserved as backing storage. |
|
default |
Default constructor.
|
inline |
Construct a new page with the given page size.
| context | Default allocation context (ignored). |
| pageSize | Number of elements per page. |
References Cogs::Collections::DefaultPage< T >::bytes, Cogs::Collections::ItemHeader::next, and Cogs::T.
|
inline |
Retrieve a pointer to the first element of the page.
References Cogs::Collections::DefaultPage< T >::bytes, and Cogs::T.
|
private |
Backing storage bytes.
Referenced by Cogs::Collections::DefaultPage< T >::DefaultPage(), and Cogs::Collections::DefaultPage< T >::getHead().