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 |
Free the heap space allocated for vector V.
References free(), NULL, T, and vec_destruct().
Referenced by vec< T, va_heap, vl_ptr >::release().
|
static |
References CXX_MEM_STAT_INFO.
Referenced by reserve(), and vec< T, va_heap, vl_ptr >::reserve().
|
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 RESERVE is 0, no vector will be created.
References vec_prefix::calculate_allocation(), gcc_checking_assert, MEM_STAT_DECL, PASS_MEM_STAT, reserve(), and T.