Last change
on this file was
49,
checked in by Sam Hocevar, 15 years ago
|
- Imported original public domain release, for future reference.
|
File size:
531 bytes
|
Line | |
---|
1 | #include "stack.hpp" |
---|
2 | #ifndef __LISP_GC_HPP_ |
---|
3 | #define __LISP_GC_HPP_ |
---|
4 | |
---|
5 | extern grow_stack<void> l_user_stack; // stack user progs can push data and have it GCed |
---|
6 | extern grow_stack<void *>l_ptr_stack; // stack of user pointers, user pointers get remapped on GC |
---|
7 | |
---|
8 | void collect_space(int which_space); // should be tmp or permenant |
---|
9 | |
---|
10 | void register_pointer(void *&addr); |
---|
11 | void unregister_pointer(void *&addr); |
---|
12 | |
---|
13 | class p_ref { |
---|
14 | public : |
---|
15 | p_ref(void *&ref) { l_ptr_stack.push(&ref); } |
---|
16 | ~p_ref() { l_ptr_stack.pop(1); } |
---|
17 | } ; |
---|
18 | |
---|
19 | |
---|
20 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.