diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-07-22 00:06:29 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-07-22 01:09:48 -0400 |
| commit | ed67cdb73c9cf3a1cba768b3122aa03564b43ccc (patch) | |
| tree | b7676278f04d251c9d0a3132d489ecc7f650cef8 /src/libstd/rt | |
| parent | fc058191818e4440d36e5ed4ef61bc0a9711be11 (diff) | |
| download | rust-ed67cdb73c9cf3a1cba768b3122aa03564b43ccc.tar.gz rust-ed67cdb73c9cf3a1cba768b3122aa03564b43ccc.zip | |
new snapshot
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 { |
