about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-08-19 13:03:46 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-08-19 14:30:01 -0700
commitcede5e53b3af92c12ae7ba6591fce7f8ca81979f (patch)
tree441629abbc494baac5e9364af96cc949009820dd /src/rt/rust_upcall.cpp
parent390dd3861933db71339dba01f09a83594a85d3eb (diff)
downloadrust-cede5e53b3af92c12ae7ba6591fce7f8ca81979f.tar.gz
rust-cede5e53b3af92c12ae7ba6591fce7f8ca81979f.zip
rt: Call maybe_gc on mallocs
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index c13ba4def87..9462db80af1 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -1,3 +1,4 @@
+#include "rust_gc.h"
 #include "rust_internal.h"
 #include "rust_upcall.h"
 
@@ -130,6 +131,8 @@ upcall_malloc(rust_task *task, size_t nbytes, type_desc *td) {
         " with gc-chain head = 0x%" PRIxPTR,
         nbytes, td, task->gc_alloc_chain);
 
+    gc::maybe_gc(task);
+
     // TODO: Maybe use dladdr here to find a more useful name for the
     // type_desc.