|
GCC Middle and Back End API Reference
|
#include <vec.h>
Public Types | |
| typedef vl_ptr | default_layout |
Public Member Functions | |
| template<typename T > | |
| void | reserve (vec< T, va_heap, vl_embed > *&v, unsigned reserve, bool exact MEM_STAT_DECL) |
Static Public Member Functions | |
| template<typename T > | |
| static void | reserve (vec< T, va_heap, vl_embed > *&, unsigned, bool CXX_MEM_STAT_INFO) |
| template<typename T > | |
| static void | release (vec< T, va_heap, vl_embed > *&) |
Types of supported allocations
va_heap - Allocation uses malloc/free.
va_gc - Allocation uses ggc_alloc.
va_gc_atomic - Same as GC, but individual elements of the array
do not need to be marked during collection. Allocator type for heap vectors.
| typedef vl_ptr va_heap::default_layout |
Heap vectors are frequently regular instances, so use the vl_ptr
layout for them.
Free the heap space allocated for vector V.
References va_gc::release(), and va_gc::reserve().
|
static |
Referenced by vec< T, va_heap, vl_ptr >::iterate(), and vec_safe_space().
|
inline |
Allocator for heap memory. Ensure there are at least RESERVE free slots in V. If EXACT is true, grow exactly, else grow exponentially. As a special case, if the vector had not been allocated and and RESERVE is 0, no vector will be created.