Go to the source code of this file.
|
| struct | SELF |
| | An allocator that prints to stdout when it allocates or frees memory. More...
|
◆ SLOT_VALUE_DEBUG
A tagged union containing an integer index type.
Definition at line 43 of file template.h.
◆ clone_from()
Definition at line 94 of file template.h.
94 {
95 to_slot->
present = from_slot->present;
96 if (from_slot->present) {
98 } else {
100 }
101}
SLOT_INDEX_TYPE next_free
static DC_INTERNAL void set_empty(SELF *slot, SLOT_INDEX_TYPE next_free)
static DC_INTERNAL void fill(SELF *slot, SLOT_VALUE value)
◆ debug()
Definition at line 103 of file template.h.
103 {
104 if (self->present) {
105 fprintf(
stream,
"[empty] { next_free: %lu}", (
size_t)self->next_free);
106 } else {
107 fprintf(
stream,
"[full] ");
109 }
110}
#define SLOT_VALUE_DEBUG
A tagged union containing an integer index type.
static DC_PUBLIC FILE * stream(SELF *self)
◆ delete()
Definition at line 112 of file template.h.
112 {
115 }
116}
#define SLOT_VALUE_DELETE
◆ fill()
Definition at line 88 of file template.h.
88 {
92}
static DC_INTERNAL void memory_tracker_present(SELF const *slot)
◆ memory_tracker_empty()
Definition at line 64 of file template.h.
64 {
70 &slot->present, sizeof(bool));
71}
static DC_PUBLIC void dc_memory_tracker_set(dc_memory_tracker_level level, dc_memory_tracker_capability cap, const volatile void *addr, size_t size)
@ DC_MEMORY_TRACKER_LVL_CONTAINER
@ DC_MEMORY_TRACKER_CAP_WRITE
@ DC_MEMORY_TRACKER_CAP_NONE
@ DC_MEMORY_TRACKER_CAP_READ_WRITE
◆ memory_tracker_present()
Definition at line 79 of file template.h.
79 {
85 &slot->present, sizeof(bool));
86}
◆ set_empty()
Definition at line 73 of file template.h.
73 {
77}
static DC_INTERNAL void memory_tracker_empty(SELF const *slot)