#include <evo/impl/container.h>
Optimized container size and capacity calculation.
|
static ulong | grow (ulong size) |
| Grow data size. More...
|
|
static ulong | init (ulong size) |
| Get initial data size. More...
|
|
|
static const ulong | INIT = 64 |
| Default initial size. More...
|
|
static const ulong | THRESHOLD = 134217728 |
| Growth threshold (max size increase) (128*1024*1024) More...
|
|
◆ grow()
static ulong grow |
( |
ulong |
size | ) |
|
|
inlinestatic |
Grow data size.
- The data size is grown by a factor of 1.5x or THRESHOLD, whichever is smaller
- Returns ULONG_MAX on overflow
- Parameters
-
size | Size to grow - must be less than ULONG_MAX |
- Returns
- Adjusted data size
◆ init()
static ulong init |
( |
ulong |
size | ) |
|
|
inlinestatic |
Get initial data size.
- Parameters
-
size | Initial size to adjust, if needed |
- Returns
- Adjusted initial size (given size or INIT, whichver is smaller)
◆ INIT
◆ THRESHOLD
const ulong THRESHOLD = 134217728 |
|
static |
Growth threshold (max size increase) (128*1024*1024)
The documentation for this class was generated from the following file: