Add callable gc method exposed to user code, use it in mlist-cycle.rs test (still not quite working; some memory corruption in the recursive tag constructors, not the GC)

This commit is contained in:
Graydon Hoare
2010-06-25 23:57:30 -07:00
parent 9236ad2846
commit 7ea416f4c3
3 changed files with 10 additions and 0 deletions

View File

@@ -81,6 +81,11 @@ refcount(rust_task *task, type_desc *t, size_t *v) {
return (*v) - 1;
}
extern "C" CDECL void
gc(rust_task *task) {
task->gc(1);
}
extern "C" CDECL rust_vec*
vec_alloc(rust_task *task, type_desc *t, size_t n_elts)
{