File: gc.h

package info (click to toggle)
kernel-source-2.0.35 2.0.35-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 32,456 kB
  • ctags: 94,327
  • sloc: ansic: 587,014; asm: 26,388; makefile: 4,055; sh: 1,221; perl: 727; tcl: 408; cpp: 277; lisp: 211; awk: 134
file content (46 lines) | stat: -rw-r--r-- 898 bytes parent folder | download | duplicates (20)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 *	Interface routines assumed by gc()
 *
 *	Copyright (C) Barak A. Pearlmutter.
 *	Released under the GPL version 2 or later.
 *
 */

typedef struct object *pobj;	/* pointer to a guy of the type we gc */

/*
 *	How to mark and unmark objects
 */

extern void gc_mark(pobj);
extern void gc_unmark(pobj);
extern int gc_marked(pobj);

/* 
 *	How to count and access an object's children
 */

extern int n_children(pobj);	/* how many children */
extern pobj child_n(pobj, int);	/* child i, numbered 0..n-1 */

/*
 *	How to access the root set
 */

extern int root_size(void);	/* number of things in root set */
extern pobj root_elt(int);	/* element i of root set, numbered 0..n-1 */

/*
 *	How to access the free list
 */

extern void clear_freelist(void);
extern void add_to_free_list(pobj);

/*
 *	How to iterate through all objects in memory
 */

extern int N_OBJS;
extern pobj obj_number(int);