From 7ea416f4c33631d76fd5b12830c0d326803061c1 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 25 Jun 2010 23:57:30 -0700 Subject: 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) --- src/rt/rust_builtin.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/rt/rust_builtin.cpp') diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 71aa644b..eb84355f 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -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) { -- cgit v1.2.3