From 0aedecf96b08c41ea481eaaebd4e5d2e2325d9c9 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Tue, 2 Jul 2013 19:24:58 -0400 Subject: add a temporary vector_exchange_malloc lang item --- src/libstd/rt/global_heap.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libstd') 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"] -- cgit 1.4.1-3-g733a5