Graphviz 13.0.0~dev.20241220.2304
|
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
struct | _vmalloc_s |
Typedefs | |
typedef struct _vmalloc_s | Vmalloc_t |
Functions | |
Vmalloc_t * | vmopen (void) |
void | vmclose (Vmalloc_t *) |
void | vmclear (Vmalloc_t *) |
void * | vmalloc (Vmalloc_t *vm, size_t size) |
void | vmfree (Vmalloc_t *vm, void *data) |
char * | vmstrdup (Vmalloc_t *, const char *) |
typedef struct _vmalloc_s Vmalloc_t |
void * vmalloc | ( | Vmalloc_t * | vm, |
size_t | size | ||
) |
allocate heap memory
vm | region allocating from |
size | desired block size |
Definition at line 40 of file vmalloc.c.
References _vmalloc_s::allocated, make_space(), malloc(), NULL, and _vmalloc_s::size.
Referenced by eval(), exprintf(), exsplit(), exstralloc(), exsubstr(), extoken_fn(), extokens(), prformat(), scformat(), str_add(), str_and(), str_ior(), str_mod(), str_mpy(), str_xor(), and vmstrdup().
|
extern |
Clear out all allocated space.
Note that this leaves the allocation region itself usable, but just frees all previous allocations made within this region.
vm | Vmalloc to operate on |
Definition at line 21 of file vmclear.c.
References _vmalloc_s::allocated, _vmalloc_s::capacity, free(), NULL, and _vmalloc_s::size.
Referenced by vmclose().
|
extern |
void vmfree | ( | Vmalloc_t * | vm, |
void * | data | ||
) |
free heap memory
vm | Region the pointer was originally allocated from |
data | The pointer originally received from vmalloc |
Definition at line 57 of file vmalloc.c.
References _vmalloc_s::allocated, free(), and _vmalloc_s::size.
Referenced by eval(), prformat(), and scformat().
|
extern |
|
extern |
Definition at line 19 of file vmstrdup.c.
References len(), NULL, and vmalloc().
Referenced by eval(), exstring(), exsub(), extoken_fn(), and prformat().