Graphviz 13.1.2~dev.20250724.1051
Loading...
Searching...
No Matches
mem.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#ifdef __cplusplus
14extern "C" {
15#endif
16
17#include <stddef.h>
18
19#if !defined(__CYGWIN__) && defined(__GNUC__) && !defined(__MINGW32__)
20#define INTERNAL __attribute__((visibility("hidden")))
21#else
22#define INTERNAL /* nothing */
23#endif
24
25 /* Support for freelists */
26
27 typedef struct freelist {
28 struct freenode *head; /* List of free nodes */
29 struct freeblock *blocklist; /* List of malloced blocks */
30 int nodesize; /* Size of node */
32
34INTERNAL void freeinit(Freelist *, int);
35INTERNAL void makefree(void *, Freelist *);
36
37#undef INTERNAL
38
39#ifdef __cplusplus
40}
41#endif
#define INTERNAL
Definition mem.h:22
INTERNAL void * getfree(Freelist *)
Definition memory.c:60
INTERNAL void freeinit(Freelist *, int)
Definition memory.c:41
struct freelist Freelist
INTERNAL void makefree(void *, Freelist *)
Definition memory.c:83
Definition mem.h:27
int nodesize
Definition mem.h:30
struct freenode * head
Definition mem.h:28
struct freeblock * blocklist
Definition mem.h:29