Derive-C
Loading...
Searching...
No Matches
SELF Struct Reference

An allocator that prints to stdout when it allocates or frees memory. More...

#include <template.h>

Public Member Functions

 PRIV (block) **blocks

Data Fields

BLOCK_VECTOR blocks
size_t current_block_idx
size_t current_block_offset
ref alloc_ref
dc_gdb_marker derive_c_chunkedbumpalloc
char const * name
FILE * stream
buffer * buffer
char * head_ptr
char * last_alloc_ptr
dc_gdb_marker derive_c_hybridstaticalloc
SLAB_VECTOR slabs
void * free_list_head
dc_gdb_marker derive_c_slaballoc
ALLOCATIONS_MAP allocations
size_t count
INDEX_TYPE free_list
INDEX_TYPE block_current
INDEX_TYPE block_current_exclusive_end
dc_gdb_marker derive_c_arena_basic
mutation_tracker iterator_invalidation_tracker
SLOTslots
size_t capacity
size_t exclusive_end
dc_gdb_marker derive_c_arena_blocks
size_t block_current_exclusive_end
uint8_t block_current
SLOTblocks [DC_ARENA_GEO_MAX_NUM_BLOCKS(INDEX_BITS, INITIAL_BLOCK_INDEX_BITS)]
uint8_t bits [DC_BITSET_STATIC_CAPACITY_TO_BYTES(EXCLUSIVE_END_INDEX)]
dc_gdb_marker derive_c_bitset_static
size_t buckets_capacity
BUCKETbuckets
SLOT_VECTOR slots
dc_gdb_marker derive_c_hashmap
size_t items
KEY_ENTRYkeys
VALUEvalues
size_t size
ENTRY entries [CAPACITY]
dc_gdb_marker derive_c_map_staticlinear
size_t tombstones
_dc_swiss_ctrlctrl
ITEMdata
size_t head
size_t tail
bool empty
dc_gdb_marker derive_c_circular
ITEM_VECTORS front
ITEM_VECTORS back
dc_gdb_marker derive_c_deque
MAP map
dc_gdb_marker derive_c_vector_marker
INDEX_TYPE size
ITEM data [CAPACITY]
dc_gdb_marker derive_c_staticvec
union { 
   ITEM   item 
}; 
bool present
dc_gdb_marker derive_c_option
bool success
union { 
   OK   ok 
   ERROR   error 
result
SLOT_VALUE value
SLOT_INDEX_TYPE next_free
char * buf
size_t size_without_null

Detailed Description

An allocator that prints to stdout when it allocates or frees memory.

A simple, portable string builder that can be templated by allocator.

A wrapper allocator, that can also be used as a mock. A transparent wrapper around any other allocator.

  • Takes a specific instance, so we can define different printers for different instances of data structures, only see the allocations we want to.

Used in fuzz tests to match the SutNS/templated struct naming interface the fuzz tests rely on.

  • Used in release by the test allocator.
  • Not entirely zero cost, as the reference type is pointer size, even if the wrapped allocator's reference is not.
    • Uses GNU additional feature fopencookie, so not available without glibc.

Definition at line 45 of file template.h.

Member Function Documentation

◆ PRIV()

SELF::PRIV ( block )

Field Documentation

◆ [union]

union { ... } SELF

◆ alloc_ref

ref SELF::alloc_ref

Definition at line 49 of file template.h.

◆ allocations

ALLOCATIONS_MAP SELF::allocations

Definition at line 43 of file template.h.

◆ back

ITEM_VECTORS SELF::back

Definition at line 62 of file template.h.

◆ bits

Definition at line 32 of file template.h.

◆ block_current [1/2]

INDEX_TYPE SELF::block_current

Definition at line 82 of file template.h.

◆ block_current [2/2]

uint8_t SELF::block_current

Definition at line 113 of file template.h.

◆ block_current_exclusive_end [1/2]

INDEX_TYPE SELF::block_current_exclusive_end

Definition at line 83 of file template.h.

◆ block_current_exclusive_end [2/2]

size_t SELF::block_current_exclusive_end

Definition at line 110 of file template.h.

◆ blocks [1/2]

BLOCK_VECTOR SELF::blocks

Definition at line 46 of file template.h.

◆ blocks [2/2]

Definition at line 114 of file template.h.

◆ buckets

BUCKET* SELF::buckets

Definition at line 134 of file template.h.

◆ buckets_capacity

size_t SELF::buckets_capacity

Definition at line 133 of file template.h.

◆ buf

char* SELF::buf

Definition at line 18 of file template.h.

◆ buffer

buffer* SELF::buffer

Definition at line 26 of file template.h.

◆ capacity

size_t SELF::capacity

Definition at line 72 of file template.h.

◆ count

size_t SELF::count

Definition at line 78 of file template.h.

◆ ctrl

_dc_swiss_ctrl* SELF::ctrl

Definition at line 84 of file template.h.

◆ current_block_idx

size_t SELF::current_block_idx

Definition at line 47 of file template.h.

◆ current_block_offset

size_t SELF::current_block_offset

Definition at line 48 of file template.h.

◆ data [1/2]

ITEM * SELF::data

Definition at line 44 of file template.h.

◆ data [2/2]

ITEM SELF::data[CAPACITY]

Definition at line 68 of file template.h.

◆ derive_c_arena_basic

dc_gdb_marker SELF::derive_c_arena_basic

Definition at line 86 of file template.h.

◆ derive_c_arena_blocks

dc_gdb_marker SELF::derive_c_arena_blocks

Definition at line 107 of file template.h.

◆ derive_c_bitset_static

dc_gdb_marker SELF::derive_c_bitset_static

Definition at line 33 of file template.h.

◆ derive_c_chunkedbumpalloc

dc_gdb_marker SELF::derive_c_chunkedbumpalloc

Definition at line 50 of file template.h.

◆ derive_c_circular

dc_gdb_marker SELF::derive_c_circular

Definition at line 51 of file template.h.

◆ derive_c_deque

dc_gdb_marker SELF::derive_c_deque

Definition at line 63 of file template.h.

◆ derive_c_hashmap

dc_gdb_marker SELF::derive_c_hashmap

Definition at line 138 of file template.h.

◆ derive_c_hybridstaticalloc

dc_gdb_marker SELF::derive_c_hybridstaticalloc

Definition at line 30 of file template.h.

◆ derive_c_map_staticlinear

dc_gdb_marker SELF::derive_c_map_staticlinear

Definition at line 78 of file template.h.

◆ derive_c_option

dc_gdb_marker SELF::derive_c_option

Definition at line 46 of file template.h.

◆ derive_c_slaballoc

dc_gdb_marker SELF::derive_c_slaballoc

Definition at line 58 of file template.h.

◆ derive_c_staticvec

dc_gdb_marker SELF::derive_c_staticvec

Definition at line 69 of file template.h.

◆ derive_c_vector_marker

dc_gdb_marker SELF::derive_c_vector_marker

Definition at line 47 of file template.h.

◆ empty

bool SELF::empty

Definition at line 49 of file template.h.

◆ entries

ENTRY SELF::entries[CAPACITY]

Definition at line 76 of file template.h.

◆ error

ERROR SELF::error

Definition at line 72 of file template.h.

◆ exclusive_end

size_t SELF::exclusive_end

Definition at line 79 of file template.h.

◆ free_list

INDEX_TYPE SELF::free_list

Definition at line 79 of file template.h.

◆ free_list_head

void* SELF::free_list_head

Definition at line 56 of file template.h.

◆ front

ITEM_VECTORS SELF::front

Definition at line 61 of file template.h.

◆ head

size_t SELF::head

Definition at line 47 of file template.h.

◆ head_ptr

char* SELF::head_ptr

Definition at line 28 of file template.h.

◆ item

ITEM SELF::item

Definition at line 43 of file template.h.

◆ items

size_t SELF::items

Definition at line 79 of file template.h.

◆ iterator_invalidation_tracker

mutation_tracker SELF::iterator_invalidation_tracker

Definition at line 87 of file template.h.

◆ keys

KEY_ENTRY* SELF::keys

Definition at line 80 of file template.h.

◆ last_alloc_ptr

char* SELF::last_alloc_ptr

Definition at line 29 of file template.h.

◆ map

MAP SELF::map

Definition at line 68 of file template.h.

◆ name

char const* SELF::name

Definition at line 15 of file template.h.

◆ next_free

SLOT_INDEX_TYPE SELF::next_free

Definition at line 59 of file template.h.

◆ ok

OK SELF::ok

Definition at line 71 of file template.h.

◆ present

bool SELF::present

Definition at line 45 of file template.h.

◆ [union]

union { ... } SELF::result

◆ size [1/2]

size_t SELF::size

Definition at line 75 of file template.h.

◆ size [2/2]

INDEX_TYPE SELF::size

Definition at line 67 of file template.h.

◆ size_without_null

size_t SELF::size_without_null

Definition at line 19 of file template.h.

◆ slabs

SLAB_VECTOR SELF::slabs

Definition at line 55 of file template.h.

◆ slots [1/2]

SLOT * SELF::slots

Definition at line 71 of file template.h.

◆ slots [2/2]

SLOT_VECTOR SELF::slots

Definition at line 135 of file template.h.

◆ stream

FILE * SELF::stream

Definition at line 16 of file template.h.

◆ success

bool SELF::success

Definition at line 69 of file template.h.

◆ tail

size_t SELF::tail

Definition at line 48 of file template.h.

◆ tombstones

size_t SELF::tombstones

Definition at line 82 of file template.h.

◆ value

SLOT_VALUE SELF::value

Definition at line 58 of file template.h.

◆ values

VALUE* SELF::values

Definition at line 81 of file template.h.


The documentation for this struct was generated from the following files:
  • /home/runner/work/derive-C/derive-C/src/derive-c/alloc/chunkedbump/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/alloc/debug/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/alloc/hybridstatic/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/alloc/slab/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/alloc/test/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/alloc/wrap/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/arena/chunked/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/arena/contiguous/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/arena/geometric/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/bitset/static/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/map/ankerl/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/map/decomposed/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/map/staticlinear/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/map/swiss/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/queue/circular/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/queue/deque/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/set/swiss/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/vector/dynamic/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/container/vector/static/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/utils/option/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/utils/result/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/utils/slot/template.h
  • /home/runner/work/derive-C/derive-C/src/derive-c/utils/string_builder/template.h