about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/rt/global_heap.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/rt/global_heap.rs b/src/libstd/rt/global_heap.rs
index 1020580d52c..0e5b6427357 100644
--- a/src/libstd/rt/global_heap.rs
+++ b/src/libstd/rt/global_heap.rs
@@ -85,6 +85,14 @@ pub unsafe fn exchange_malloc(align: u32, size: uintptr_t) -> *c_char {
     malloc_raw(total_size as uint) as *c_char
 }
 
+#[cfg(not(test))]
+#[lang="vector_exchange_malloc"]
+#[inline]
+pub unsafe fn vector_exchange_malloc(align: u32, size: uintptr_t) -> *c_char {
+    let total_size = get_box_size(size as uint, align as uint);
+    malloc_raw(total_size as uint) as *c_char
+}
+
 // FIXME: #7496
 #[cfg(not(test))]
 #[lang="closure_exchange_malloc"]