diff options
| author | bors <bors@rust-lang.org> | 2013-07-08 02:52:56 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-08 02:52:56 -0700 |
| commit | 48ad726f2abc90fe62cdf239bc1c9318261a6926 (patch) | |
| tree | fb48c49be09efe99d543e18e1dd711d444521639 /src/libstd/rt | |
| parent | 44770ae3a8001de38b33e449889c6444808941fc (diff) | |
| parent | 90f1db10fa29eb6b91e22037f13130f854da1401 (diff) | |
| download | rust-48ad726f2abc90fe62cdf239bc1c9318261a6926.tar.gz rust-48ad726f2abc90fe62cdf239bc1c9318261a6926.zip | |
auto merge of #7605 : thestinger/rust/vec, r=Aatch
This is work continued from the now landed #7495 and #7521 pulls. Removing the headers from unique vectors is another project, so I've separated the allocator.
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/global_heap.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/rt/global_heap.rs b/src/libstd/rt/global_heap.rs index 1020580d52c..54deb8924f5 100644 --- a/src/libstd/rt/global_heap.rs +++ b/src/libstd/rt/global_heap.rs @@ -80,7 +80,14 @@ pub unsafe fn exchange_malloc(td: *c_char, size: uintptr_t) -> *c_char { #[cfg(not(stage0), not(test))] #[lang="exchange_malloc"] #[inline] -pub unsafe fn exchange_malloc(align: u32, size: uintptr_t) -> *c_char { +pub unsafe fn exchange_malloc(_align: u32, size: uintptr_t) -> *c_char { + malloc_raw(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 } |
