GCC Middle and Back End API Reference
vec_prefix Struct Reference

#include <vec.h>

Public Member Functions

void register_overhead (size_t, const char *, int, const char *)
void release_overhead (void)

Static Public Member Functions

static unsigned calculate_allocation (vec_prefix *, unsigned, bool)

Data Fields

unsigned alloc_
unsigned num_

Friends

struct vec
struct va_gc
struct va_gc_atomic
struct va_heap
struct va_stack

Detailed Description

Control data for vectors.  This contains the number of allocated
   and used slots inside a vector.   

Member Function Documentation

unsigned vec_prefix::calculate_allocation ( vec_prefix pfx,
unsigned  reserve,
bool  exact 
)
static
Calculate the number of slots to reserve a vector, making sure that
   RESERVE slots are free.  If EXACT grow exactly, otherwise grow
   exponentially.  PFX is the control data for the vector.   

References alloc_, and num_.

Referenced by va_heap::reserve(), and va_gc::reserve().

void vec_prefix::register_overhead ( size_t  size,
const char *  name,
int  line,
const char *  function 
)
void vec_prefix::release_overhead ( void  )
Notice that the memory allocated for the vector has been freed.   

References ptr_hash_entry::allocated, loc_descriptor::allocated, free(), ptr_hash_entry::loc, and ptr_hash.


Friends And Related Function Documentation

friend struct va_gc
friend
friend struct va_gc_atomic
friend
friend struct va_heap
friend
friend struct va_stack
friend
friend struct vec
friend

Field Documentation

unsigned vec_prefix::alloc_

Referenced by calculate_allocation().

unsigned vec_prefix::num_

Referenced by calculate_allocation().


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