An array using a large virtual memory reservation to keep stable addresses.
More...
#include <VirtualArray.h>
|
|
| VirtualArray (size_t maxCapacity) |
| |
| void | release () |
| | Releases all reserved memory.
|
| |
| void | clear () |
| | Clears the stable array by calling the destructor of each element.
|
| |
| bool | clearAndDecommit () |
| | Clears the array calling destructors of each element and releases virtual memory.
|
| |
| bool | decommit () |
| | De-commits unused-memory, while still keeping the original virtual reservation.
|
| |
| bool | resizeWithoutInitializing (size_t newSize) |
| | Resizes the stable array without initializing or calling destructors.
|
| |
| bool | resize (size_t newSize) |
| | Resizes the stable array, calling constructors or destructors as needed.
|
| |
| bool | reserve (size_t maxNumElements) |
| | Reserves memory for the stable array without initializing elements.
|
| |
|
size_t | capacity () const |
| |
|
size_t | size () const |
| |
|
T * | data () |
| |
|
const T * | data () const |
| |
|
| operator Span< T > () |
| |
|
| operator Span< const T > () const |
| |
|
Span< T > | toSpan () |
| |
|
Span< const T > | toSpan () const |
| |
template<typename T>
struct SC::VirtualArray< T >
An array using a large virtual memory reservation to keep stable addresses.
◆ clear()
Clears the stable array by calling the destructor of each element.
- Note
- Does not release reserved memory (use release() for that).
◆ clearAndDecommit()
Clears the array calling destructors of each element and releases virtual memory.
◆ decommit()
De-commits unused-memory, while still keeping the original virtual reservation.
◆ release()
Releases all reserved memory.
- Warning
- Does not call destructors of contained elements (use clear() for that).
◆ reserve()
Reserves memory for the stable array without initializing elements.
◆ resize()
Resizes the stable array, calling constructors or destructors as needed.
◆ resizeWithoutInitializing()
Resizes the stable array without initializing or calling destructors.
The documentation for this struct was generated from the following file: