diff options
| author | bors <bors@rust-lang.org> | 2013-07-21 22:34:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-21 22:34:36 -0700 |
| commit | 74f4badcab30c91b018f308d2c44641abed7d732 (patch) | |
| tree | 81dd71ea871e583375edf2dc423b17f3653b2e08 /src/libstd/rt | |
| parent | 3d6c0bc05640b9cc62db9fe287903cb709056dcb (diff) | |
| parent | f51e2ad435d7c0b4cb1bdebc5b6db29b65249125 (diff) | |
| download | rust-74f4badcab30c91b018f308d2c44641abed7d732.tar.gz rust-74f4badcab30c91b018f308d2c44641abed7d732.zip | |
auto merge of #7955 : thestinger/rust/snapshot, r=huonw
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/global_heap.rs | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/libstd/rt/global_heap.rs b/src/libstd/rt/global_heap.rs index d0b268ace54..580390c1953 100644 --- a/src/libstd/rt/global_heap.rs +++ b/src/libstd/rt/global_heap.rs @@ -56,28 +56,8 @@ pub unsafe fn realloc_raw(ptr: *mut c_void, size: uint) -> *mut c_void { p } -// FIXME #4942: Make these signatures agree with exchange_alloc's signatures -#[cfg(stage0, not(test))] -#[lang="exchange_malloc"] -#[inline] -pub unsafe fn exchange_malloc(td: *c_char, size: uintptr_t) -> *c_char { - let td = td as *TyDesc; - let size = size as uint; - - assert!(td.is_not_null()); - - let total_size = get_box_size(size, (*td).align); - let p = malloc_raw(total_size as uint); - - let box: *mut BoxRepr = p as *mut BoxRepr; - (*box).header.ref_count = -1; - (*box).header.type_desc = td; - - box as *c_char -} - /// The allocator for unique pointers without contained managed pointers. -#[cfg(not(stage0), not(test))] +#[cfg(not(test))] #[lang="exchange_malloc"] #[inline] pub unsafe fn exchange_malloc(size: uintptr_t) -> *c_char { |
