#include "univ.i"#include "mem0mem.h"Include dependency graph for ut0vec.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| struct | ib_vector_struct |
Typedefs | |
| typedef ib_vector_struct | ib_vector_t |
Functions | |
| ib_vector_t * | ib_vector_create (mem_heap_t *heap, ulint size) |
| void | ib_vector_push (ib_vector_t *vec, void *elem) |
| UNIV_INLINE ulint | ib_vector_size (ib_vector_t *vec) |
| UNIV_INLINE void * | ib_vector_get (ib_vector_t *vec, ulint n) |
| typedef struct ib_vector_struct ib_vector_t |
| ib_vector_t* ib_vector_create | ( | mem_heap_t * | heap, | |
| ulint | size | |||
| ) |
Definition at line 11 of file ut0vec.c.
References mem_heap_alloc(), and ut_a.
Referenced by pars_info_add_function(), pars_info_add_id(), and pars_info_add_literal().
00013 : vector */ 00014 mem_heap_t* heap, /* in: heap */ 00015 ulint size) /* in: initial size */ 00016 { 00017 ib_vector_t* vec; 00018 00019 ut_a(size > 0); 00020 00021 vec = mem_heap_alloc(heap, sizeof(*vec)); 00022 00023 vec->heap = heap; 00024 vec->data = mem_heap_alloc(heap, sizeof(void*) * size); 00025 vec->used = 0; 00026 vec->total = size; 00027 00028 return(vec); 00029 }
Here is the call graph for this function:

Here is the caller graph for this function:

| UNIV_INLINE void* ib_vector_get | ( | ib_vector_t * | vec, | |
| ulint | n | |||
| ) |
Referenced by pars_info_get_bound_id(), pars_info_get_bound_lit(), and pars_info_get_user_func().
Here is the caller graph for this function:

| void ib_vector_push | ( | ib_vector_t * | vec, | |
| void * | elem | |||
| ) |
Definition at line 35 of file ut0vec.c.
References ib_vector_struct::data, ib_vector_struct::heap, mem_heap_alloc(), memcpy, ib_vector_struct::total, and ib_vector_struct::used.
Referenced by pars_info_add_function(), pars_info_add_id(), and pars_info_add_literal().
00037 : vector */ 00038 void* elem) /* in: data element */ 00039 { 00040 if (vec->used >= vec->total) { 00041 void** new_data; 00042 ulint new_total = vec->total * 2; 00043 00044 new_data = mem_heap_alloc(vec->heap, 00045 sizeof(void*) * new_total); 00046 memcpy(new_data, vec->data, sizeof(void*) * vec->total); 00047 00048 vec->data = new_data; 00049 vec->total = new_total; 00050 } 00051 00052 vec->data[vec->used] = elem; 00053 vec->used++; 00054 }
Here is the call graph for this function:

Here is the caller graph for this function:

| UNIV_INLINE ulint ib_vector_size | ( | ib_vector_t * | vec | ) |
Referenced by pars_info_get_bound_id(), pars_info_get_bound_lit(), and pars_info_get_user_func().
Here is the caller graph for this function:

1.4.7

