Graphviz
13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
vmalloc.h
Go to the documentation of this file.
1
/*************************************************************************
2
* Copyright (c) 2011 AT&T Intellectual Property
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* https://www.eclipse.org/legal/epl-v10.html
7
*
8
* Contributors: Details at https://graphviz.org
9
*************************************************************************/
10
11
#pragma once
12
13
#include <stddef.h>
14
15
#ifdef __cplusplus
16
extern
"C"
{
17
#endif
18
19
/* Public header file for the virtual malloc package.
20
**
21
** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
22
*/
23
24
typedef
struct
_vmalloc_s
Vmalloc_t
;
25
26
struct
_vmalloc_s
{
27
void
**
allocated
;
/* pointers we have given out */
28
size_t
size
;
/* used entries in `allocated` */
29
size_t
capacity
;
/* available entries in `allocated` */
30
};
31
32
extern
Vmalloc_t
*
vmopen
(
void
);
33
extern
void
vmclose
(
Vmalloc_t
*);
34
extern
void
vmclear
(
Vmalloc_t
*);
35
42
void
*
vmalloc
(
Vmalloc_t
*vm,
size_t
size);
43
49
void
vmfree
(
Vmalloc_t
*vm,
void
*
data
);
50
51
extern
char
*
vmstrdup
(
Vmalloc_t
*,
const
char
*);
52
53
#ifdef __cplusplus
54
}
55
#endif
_vmalloc_s
Definition
vmalloc.h:26
_vmalloc_s::allocated
void ** allocated
Definition
vmalloc.h:27
_vmalloc_s::capacity
size_t capacity
Definition
vmalloc.h:29
_vmalloc_s::size
size_t size
Definition
vmalloc.h:28
data
Definition
legal.c:50
vmstrdup
char * vmstrdup(Vmalloc_t *, const char *)
Definition
vmstrdup.c:19
vmclear
void vmclear(Vmalloc_t *)
Definition
vmclear.c:21
vmfree
void vmfree(Vmalloc_t *vm, void *data)
Definition
vmalloc.c:57
vmopen
Vmalloc_t * vmopen(void)
Definition
vmopen.c:18
vmalloc
void * vmalloc(Vmalloc_t *vm, size_t size)
Definition
vmalloc.c:40
vmclose
void vmclose(Vmalloc_t *)
Definition
vmclose.c:18
lib
vmalloc
vmalloc.h
Generated by
1.9.8