diff options
| author | Graydon Hoare <[email protected]> | 2010-06-25 23:57:30 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-06-25 23:57:30 -0700 |
| commit | 7ea416f4c33631d76fd5b12830c0d326803061c1 (patch) | |
| tree | 20639257bfd83ca3f6355de01958fc8cee786237 /src/rt/rust_builtin.cpp | |
| parent | Further attempts to convince mem_ctrl to be sane. (diff) | |
| download | rust-7ea416f4c33631d76fd5b12830c0d326803061c1.tar.xz rust-7ea416f4c33631d76fd5b12830c0d326803061c1.zip | |
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)
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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) { |