|
|
1.1 root 1: /*
2: * Interface routines assumed by gc()
3: *
4: * Copyright (C) Barak A. Pearlmutter.
5: * Released under the GPL version 2 or later.
6: *
7: */
8:
9: typedef struct object *pobj; /* pointer to a guy of the type we gc */
10:
11: /*
12: * How to mark and unmark objects
13: */
14:
15: extern void gc_mark(pobj);
16: extern void gc_unmark(pobj);
17: extern int gc_marked(pobj);
18:
19: /*
20: * How to count and access an object's children
21: */
22:
23: extern int n_children(pobj); /* how many children */
24: extern pobj child_n(pobj, int); /* child i, numbered 0..n-1 */
25:
26: /*
27: * How to access the root set
28: */
29:
30: extern int root_size(void); /* number of things in root set */
31: extern pobj root_elt(int); /* element i of root set, numbered 0..n-1 */
32:
33: /*
34: * How to access the free list
35: */
36:
37: extern void clear_freelist(void);
38: extern void add_to_free_list(pobj);
39:
40: /*
41: * How to iterate through all objects in memory
42: */
43:
44: extern int N_OBJS;
45: extern pobj obj_number(int);
46:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.