File: gc.h

package info (click to toggle)
esh 0.8-7
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 508 kB
  • ctags: 542
  • sloc: ansic: 3,608; lisp: 166; makefile: 72
file content (29 lines) | stat: -rw-r--r-- 497 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* 
 * esh, the Unix shell with Lisp-like syntax. 
 * Copyright (C) 1999  Ivan Tkatchev
 * This source code is under the GPL.
 */


#ifndef _GC_H
#define _GC_H


typedef struct gc_node gc_node;

struct gc_node {
  void* data;
  char* where;
  gc_node* next;
};


extern void* gc_alloc(size_t size, char* where);
extern void gc_inc_ref(void* ptr);
extern void gc_add_ref(void* ptr, int add);
extern int gc_refs(void* ptr);
extern void gc_free(void* ptr);
extern void gc_diagnostics(void);

#endif