about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
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.