GCC Middle and Back End API 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 |
Control data for vectors. This contains the number of allocated and used slots inside a vector.
|
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.
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 | ||
) |
Account the overhead.
References vec_descriptor::allocated, ptr_hash_entry::allocated, eq_ptr(), hash_ptr(), ptr_hash_entry::loc, vec_descriptor::peak, ptr_hash_entry::ptr, ptr_hash, ptr_hash_entry::size, vec_descriptor::times, and vec_descriptor().
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.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
unsigned vec_prefix::alloc_ |
Referenced by calculate_allocation().
unsigned vec_prefix::num_ |
Referenced by calculate_allocation().