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

◆ default_layout

Member Function Documentation

◆ release()

template<typename T >
void va_heap::release ( vec< T, va_heap, vl_embed > *& v)
static
Free the heap space allocated for vector V.   

References free(), NULL, T, and vec_destruct().

Referenced by vec< T, va_heap, vl_ptr >::release().

◆ reserve() [1/2]

template<typename T >
static void va_heap::reserve ( vec< T, va_heap, vl_embed > *& ,
unsigned ,
bool CXX_MEM_STAT_INFO )
static

◆ reserve() [2/2]

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 RESERVE is 0, no vector will be created.   

References vec_prefix::calculate_allocation(), gcc_checking_assert, PASS_MEM_STAT, reserve(), and T.


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