GCC Middle and Back End API Reference
va_stack Struct Reference

#include <vec.h>

Public Types

typedef vl_ptr default_layout

Public Member Functions

template<typename T >
void reserve (vec< T, va_stack, vl_embed > *&v, unsigned nelems, bool exact MEM_STAT_DECL)

Static Public Member Functions

template<typename T >
static void alloc (vec< T, va_stack, vl_ptr > &, unsigned, vec< T, va_stack, vl_embed > *)
template<typename T >
static void reserve (vec< T, va_stack, vl_embed > *&, unsigned, bool CXX_MEM_STAT_INFO)
template<typename T >
static void release (vec< T, va_stack, vl_embed > *&)

Detailed Description

Allocator type for stack vectors.   

Member Typedef Documentation


Member Function Documentation

template<typename T >
void va_stack::alloc ( vec< T, va_stack, vl_ptr > &  v,
unsigned  nelems,
vec< T, va_stack, vl_embed > *  space 
)
static
Allocate a vector V which uses alloca for the initial allocation.
   SPACE is space allocated using alloca.  NELEMS is the number of
   entries allocated.   

References register_stack_vec().

Referenced by vec< T, A, vl_embed >::embedded_init().

template<typename T >
void va_stack::release ( vec< T, va_stack, vl_embed > *&  v)
static
Free a vector allocated on the stack.  Don't actually free it if we
   find it in the hash table.   

References stack_vec_register_index(), and unregister_stack_vec().

Referenced by vec_free().

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

Referenced by reserve(), and vec_safe_reserve().

template<typename T >
void va_stack::reserve ( vec< T, va_stack, vl_embed > *&  v,
unsigned  nelems,
bool exact  MEM_STAT_DECL 
)
Reserve NELEMS slots for a vector initially allocated on the stack.
   When this happens, we switch back to heap allocation.  We remove
   the vector from stack_vecs, if it is there, since we no longer need
   to avoid freeing it.  If EXACT is true, grow exactly, otherwise
   grow exponentially.   

References memcpy(), reserve(), stack_vec_register_index(), T, and unregister_stack_vec().


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