|
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(), m_alloc, m_num, and MAX.
Referenced by va_gc::reserve(), and va_heap::reserve().
|
static |
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.
Referenced by calculate_allocation().
| void vec_prefix::register_overhead | ( | void * | , |
| size_t | , | ||
| size_t | CXX_MEM_STAT_INFO ) |
Account the overhead.
References FINAL_PASS_MEM_STAT, MEM_STAT_DECL, usage(), vec_mem_desc, and VEC_ORIGIN.
| void vec_prefix::release_overhead | ( | void * | , |
| size_t | , | ||
| size_t | , | ||
| bool | CXX_MEM_STAT_INFO ) |
Notice that the memory allocated for the vector has been freed.
References FINAL_PASS_MEM_STAT, MEM_STAT_DECL, usage(), vec_mem_desc, and VEC_ORIGIN.
|
friend |
References va_gc_atomic.
Referenced by va_gc_atomic.
| unsigned vec_prefix::m_alloc |
Referenced by calculate_allocation().
| unsigned vec_prefix::m_num |
Referenced by calculate_allocation().
| unsigned vec_prefix::m_using_auto_storage |