GCC Middle and Back End API Reference
va_heap Struct 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 > *&)

Detailed Description

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.


Member Typedef Documentation

Heap vectors are frequently regular instances, so use the vl_ptr layout for them.


Member Function Documentation

template<typename T >
void va_heap::release ( vec< T, va_heap, vl_embed > *&  v)
static

Free the heap space allocated for vector V.

References CXX_MEM_STAT_INFO, va_gc::release(), and va_gc::reserve().

template<typename T >
static void va_heap::reserve ( vec< T, va_heap, vl_embed > *&  ,
unsigned  ,
bool  CXX_MEM_STAT_INFO 
)
static
template<typename T >
void va_heap::reserve ( vec< T, va_heap, vl_embed > *&  v,
unsigned  reserve,
bool exact  MEM_STAT_DECL 
)
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.


The documentation for this struct was generated from the following file: