Graphviz  2.41.20170921.2350
mem.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 
19 
20 #ifndef MEMORY_H
21 #define MEMORY_H
22 
23 #ifndef NULL
24 #define NULL 0
25 #endif
26 
27  /* Support for freelists */
28 
29  typedef struct freelist {
30  struct freenode *head; /* List of free nodes */
31  struct freeblock *blocklist; /* List of malloced blocks */
32  int nodesize; /* Size of node */
33  } Freelist;
34 
35  extern void *getfree(Freelist *);
36  extern void freeinit(Freelist *, int);
37  extern void makefree(void *, Freelist *);
38 
39 #endif
40 
41 
42 #ifdef __cplusplus
43 }
44 #endif
struct freeblock * blocklist
Definition: mem.h:31
struct freelist Freelist
void * getfree(Freelist *)
Definition: memory.c:62
int nodesize
Definition: mem.h:32
void makefree(void *, Freelist *)
Definition: memory.c:86
Definition: mem.h:29
struct freenode * head
Definition: mem.h:30
void freeinit(Freelist *, int)
Definition: memory.c:43