diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-07-02 19:24:58 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-07-08 03:41:21 -0400 |
| commit | 0aedecf96b08c41ea481eaaebd4e5d2e2325d9c9 (patch) | |
| tree | e8f72e06d1b1379001abbc9f365e877c538b3b72 /src/libstd | |
| parent | 7bf34c34377986d73376967c7ca967f3bc484c1f (diff) | |
| download | rust-0aedecf96b08c41ea481eaaebd4e5d2e2325d9c9.tar.gz rust-0aedecf96b08c41ea481eaaebd4e5d2e2325d9c9.zip | |
add a temporary vector_exchange_malloc lang item
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/rt/global_heap.rs | 8 |
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"] |
