|
Derive-C
|
#include <derive-c/core/includes/def.h>#include "includes.h"#include <derive-c/core/alloc/def.h>#include <derive-c/core/self/def.h>#include <derive-c/core/self/undef.h>#include <derive-c/core/alloc/undef.h>#include <derive-c/core/includes/undef.h>Go to the source code of this file.
Data Structures | |
| struct | SELF |
| An allocator that prints to stdout when it allocates or frees memory. More... | |
Macros | |
| #define | CAPACITY 1024 |
| A hybrid of a bump allocator on a statically allocated buffer, and any other allocator. | |
Typedefs | |
| typedef char | buffer[CAPACITY] |
Functions | |
| DC_STATIC_ASSERT (CAPACITY > 0, "Capacity must be larger than zero") | |
| static DC_INTERNAL bool PRIV | contains_ptr (SELF const *self, void *ptr) |
| static DC_PUBLIC SELF | new (buffer *buffer, ref alloc_ref) |
| static DC_PUBLIC void *PRIV | static_allocate_zeroed (SELF *self, size_t size) |
| static DC_PUBLIC void * | allocate_zeroed (SELF *self, size_t size) |
| static DC_PUBLIC void *PRIV | static_allocate_uninit (SELF *self, size_t size) |
| static DC_PUBLIC void * | allocate_uninit (SELF *self, size_t size) |
| static DC_PUBLIC void PRIV | static_deallocate (SELF *self, void *ptr, size_t size) |
| static DC_PUBLIC void | deallocate (SELF *self, void *ptr, size_t size) |
| static DC_PUBLIC void *PRIV | static_reallocate (SELF *self, void *ptr, size_t old_size, size_t new_size) |
| static DC_PUBLIC void * | reallocate (SELF *self, void *ptr, size_t old_size, size_t new_size) |
| static DC_PUBLIC void | debug (SELF const *self, dc_debug_fmt fmt, FILE *stream) |
| static DC_PUBLIC void | reset (SELF *self) |
| static DC_PUBLIC void | delete (SELF *self) |
| DC_TRAIT_REFERENCABLE_BY_PTR (SELF) | |
| DC_TRAIT_ALLOC (SELF) | |
| #define CAPACITY 1024 |
A hybrid of a bump allocator on a statically allocated buffer, and any other allocator.
Definition at line 18 of file template.h.
| typedef char buffer[CAPACITY] |
Definition at line 23 of file template.h.
Definition at line 112 of file template.h.
Definition at line 84 of file template.h.
|
static |
Definition at line 33 of file template.h.
| DC_STATIC_ASSERT | ( | CAPACITY | , |
| 0 | , | ||
| "Capacity must be larger than zero" | ) |
| DC_TRAIT_ALLOC | ( | SELF | ) |
| DC_TRAIT_REFERENCABLE_BY_PTR | ( | SELF | ) |
Definition at line 142 of file template.h.
|
static |
Definition at line 213 of file template.h.
Definition at line 243 of file template.h.
Definition at line 39 of file template.h.
Definition at line 197 of file template.h.
Definition at line 228 of file template.h.
Definition at line 92 of file template.h.
Definition at line 56 of file template.h.
Definition at line 125 of file template.h.
|
static |
Definition at line 153 of file template.h.