GDBserver

Classes | Functions
vec.c File Reference
`#include "common-defs.h"`
`#include "vec.h"`

Go to the source code of this file.

## Classes
struct | vec_prefix

## Functions
static unsigned | calculate_allocation (const struct vec_prefix *pfx, int reserve)
void * | vec_p_reserve (void *vec, int reserve)
void * | vec_o_reserve (void *vec, int reserve, size_t vec_offset, size_t elt_size)

## Function Documentation

## ◆ calculate_allocation()

static unsigned calculate_allocation | ( | const struct vec_prefix * | pfx,
|  | int | reserve
| ) |  |
| inline static

Definition at line 35 of file vec.c.

References vec_prefix::alloc, gdb_assert, and vec_prefix::num.

Referenced by vec_o_reserve().

## ◆ vec_o_reserve()

void* vec_o_reserve | ( | void * | vec,
|  | int | reserve,
|  | size_t | vec_offset,
|  | size_t | elt_size
| ) |  |

Definition at line 91 of file vec.c.

References vec_prefix::alloc, calculate_allocation(), vec_prefix::vec, vec_offset, and xrealloc().

Referenced by vec_p_reserve().

## ◆ vec_p_reserve()

void* vec_p_reserve | ( | void * | vec,
|  | int | reserve
| ) |  |

Definition at line 80 of file vec.c.

References vec_o_reserve().