![]() |
Ark Server API (ASE) - Wiki
|
#include <ContainerAllocationPolicies.h>
Private Member Functions | |
void | MoveToEmpty (ForElementType &Other) |
ElementType * | GetAllocation () const |
void | ResizeAllocation (int32 PreviousNumElements, int32 NumElements, SIZE_T NumBytesPerElement) |
int32 | CalculateSlack (int32 NumElements, int32 CurrentNumSlackElements, SIZE_T NumBytesPerElement) const |
int32 | CalculateSlackShrink (int32 NumElements, int32 CurrentNumSlackElements, SIZE_T NumBytesPerElement) const |
int32 | CalculateSlackGrow (int32 NumElements, int32 CurrentNumSlackElements, SIZE_T NumBytesPerElement) const |
SIZE_T | GetAllocatedSize (int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const |
A class that receives both the explicit allocation policy template parameters specified by the user of the container, but also the implicit ElementType template parameter from the container type.
Definition at line 133 of file ContainerAllocationPolicies.h.
|
private |
Calculates the amount of slack to allocate for an array that has just grown or shrunk to a given number of elements.
NumElements | - The number of elements to allocate space for. |
CurrentNumSlackElements | - The current number of elements allocated. |
NumBytesPerElement | - The number of bytes/element. |
|
private |
Calculates the amount of slack to allocate for an array that has just grown to a given number of elements.
NumElements | - The number of elements to allocate space for. |
CurrentNumSlackElements | - The current number of elements allocated. |
NumBytesPerElement | - The number of bytes/element. |
|
private |
Calculates the amount of slack to allocate for an array that has just shrunk to a given number of elements.
NumElements | - The number of elements to allocate space for. |
CurrentNumSlackElements | - The current number of elements allocated. |
NumBytesPerElement | - The number of bytes/element. |
|
private |
|
private |
Accesses the container's current data.
|
private |
Moves the state of another allocator into this one. Assumes that the allocator is currently empty, i.e. memory may be allocated but any existing elements have already been destructed (if necessary).
Other | - The allocator to move the state from. This allocator should be left in a valid empty state. |
|
private |
Resizes the container's allocation.
PreviousNumElements | - The number of elements that were stored in the previous allocation. |
NumElements | - The number of elements to allocate space for. |
NumBytesPerElement | - The number of bytes/element. |