|
Derive-C
|
#include <assert.h>#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <derive-c/container/arena/trait.h>#include <derive-c/core/debug/gdb_marker.h>#include <derive-c/core/debug/memory_tracker.h>#include <derive-c/core/debug/mutation_tracker.h>#include <derive-c/core/prelude.h>#include <derive-c/core/alloc/def.h>#include <derive-c/core/self/def.h>#include <derive-c/core/alloc/undef.h>#include <derive-c/core/self/undef.h>

Go to the source code of this file.
Classes | |
| struct | value_t |
| struct | INDEX |
| struct | SLOT |
| struct | SELF |
| An allocator that prints to stdout when it allocates or frees memory. More... | |
| struct | IV_PAIR |
| struct | IV_PAIR_CONST |
Macros | |
| #define | INDEX_BITS 32 |
| A vector-backed arena, with support for small indices. | |
| #define | VALUE value_t |
| #define | VALUE_DELETE value_delete |
| #define | VALUE_CLONE value_clone |
| #define | SLOT NS(SELF, slot) |
| #define | CHECK_ACCESS_INDEX(self, index) |
| #define | RESIZE_FACTOR 2 |
| #define | INDEX NS(SELF, index_t) |
| #define | INVARIANT_CHECK(self) |
| #define | IV_PAIR NS(SELF, iv) |
| #define | IV_PAIR_CONST NS(SELF, iv_const) |
Typedefs | |
| typedef VALUE | value_t |
| typedef ALLOC | alloc_t |
| typedef IV_PAIR const * | item |
Functions | |
| static void | value_delete (value_t *self) |
| static value_t | value_clone (value_t const *self) |
| STATIC_ASSERT (sizeof(VALUE), "VALUE must be a non-zero sized type") | |
| static void | memory_tracker_empty (SLOT const *slot) |
| static void | memory_tracker_present (SLOT const *slot) |
| static SELF | new_with_capacity_for (INDEX_TYPE items, ALLOC *alloc) |
| static INDEX | insert (SELF *self, VALUE value) |
| static VALUE * | try_write (SELF *self, INDEX index) |
| static VALUE * | write (SELF *self, INDEX index) |
| static VALUE const * | try_read (SELF const *self, INDEX index) |
| static VALUE const * | read (SELF const *self, INDEX index) |
| static SELF | clone (SELF const *self) |
| static INDEX_TYPE | size (SELF const *self) |
| static bool | full (SELF const *self) |
| static bool | try_remove (SELF *self, INDEX index, VALUE *destination) |
| static VALUE | remove (SELF *self, INDEX index) |
| static bool | delete_entry (SELF *self, INDEX index) |
| static bool | empty_item (IV_PAIR const *const *item) |
| static bool | empty (ITER const *iter) |
| static IV_PAIR const * | next (ITER *iter) |
| static ITER | get_iter (SELF *self) |
| static void | delete (SELF *self) |
| static bool | empty_item (IV_PAIR_CONST const *const *item) |
| static bool | empty (ITER_CONST const *iter) |
| static IV_PAIR_CONST const * | next (ITER_CONST *iter) |
| static ITER_CONST | get_iter_const (SELF const *self) |
| TRAIT_ARENA (SELF) | |
Variables | |
| static size_t | max_entries = MAX_INDEX |
| static IV_PAIR_CONST | iv_const_empty |
| #define CHECK_ACCESS_INDEX | ( | self, | |
| index ) |
Definition at line 75 of file template.h.
Definition at line 82 of file template.h.
| #define INDEX_BITS 32 |
A vector-backed arena, with support for small indices.
Definition at line 23 of file template.h.
| #define INVARIANT_CHECK | ( | self | ) |
Definition at line 142 of file template.h.
Definition at line 343 of file template.h.
Definition at line 417 of file template.h.
| #define RESIZE_FACTOR 2 |
Definition at line 79 of file template.h.
Definition at line 73 of file template.h.
| #define VALUE value_t |
Definition at line 33 of file template.h.
| #define VALUE_CLONE value_clone |
Definition at line 37 of file template.h.
| #define VALUE_DELETE value_delete |
Definition at line 35 of file template.h.
Definition at line 85 of file template.h.
Definition at line 350 of file template.h.
| typedef VALUE value_t |
Definition at line 84 of file template.h.
Definition at line 246 of file template.h.


|
static |
Definition at line 403 of file template.h.

Definition at line 322 of file template.h.


|
static |
Definition at line 361 of file template.h.


|
static |
Definition at line 440 of file template.h.

|
static |
Definition at line 352 of file template.h.


|
static |
|
static |
Definition at line 280 of file template.h.


|
static |
Definition at line 388 of file template.h.


|
static |
Definition at line 465 of file template.h.


Definition at line 171 of file template.h.


|
static |
Definition at line 104 of file template.h.


|
static |
Definition at line 113 of file template.h.


|
static |
Definition at line 148 of file template.h.


|
static |
Definition at line 370 of file template.h.


|
static |
Definition at line 446 of file template.h.

Definition at line 240 of file template.h.


Definition at line 313 of file template.h.


|
static |
Definition at line 275 of file template.h.


| STATIC_ASSERT | ( | sizeof(VALUE) | , |
| "VALUE must be a non-zero sized type" | ) |
| TRAIT_ARENA | ( | SELF | ) |
Definition at line 228 of file template.h.


Definition at line 292 of file template.h.


Definition at line 210 of file template.h.


Definition at line 36 of file template.h.
|
static |
Definition at line 34 of file template.h.
Definition at line 222 of file template.h.


|
static |
Definition at line 423 of file template.h.
|
static |
Definition at line 290 of file template.h.