GCC Middle and Back End API Reference
|
#include <vec.h>
Public Member Functions | |
void | register_overhead (void *, size_t, size_t CXX_MEM_STAT_INFO) |
void | release_overhead (void *, size_t, size_t, bool CXX_MEM_STAT_INFO) |
Static Public Member Functions | |
static unsigned | calculate_allocation (vec_prefix *, unsigned, bool) |
static unsigned | calculate_allocation_1 (unsigned, unsigned) |
Data Fields | |
unsigned | m_alloc: 31 |
unsigned | m_using_auto_storage: 1 |
unsigned | m_num |
Friends | |
template<typename , typename , typename > | |
struct | vec |
struct | va_gc |
struct | va_gc_atomic |
struct | va_heap |
Control data for vectors. This contains the number of allocated and used slots inside a vector.
|
inlinestatic |
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 calculate_allocation_1(), ggc_alloc(), and MAX.
Referenced by va_gc::reserve(), and va_heap::reserve().
Calculate the number of slots to reserve a vector, making sure that it is of at least DESIRED size by growing ALLOC exponentially.
References gcc_assert, and ggc_alloc().
Referenced by calculate_allocation().
Account the overhead.
References FINAL_PASS_MEM_STAT, ggc_alloc(), vec_usage::m_element_size, usage(), vec_mem_desc, and VEC_ORIGIN.
Notice that the memory allocated for the vector has been freed.
References FINAL_PASS_MEM_STAT, ggc_alloc(), vec_usage::m_items, usage(), vec_mem_desc, and VEC_ORIGIN.
|
friend |
unsigned vec_prefix::m_alloc |
unsigned vec_prefix::m_num |
unsigned vec_prefix::m_using_auto_storage |