diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-06-30 23:30:40 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-06-30 23:30:40 -0400 |
| commit | 5b40f2ae5b4357a9488bd97da011bd07aebf6aaa (patch) | |
| tree | a18f2744b792d5698140b397247f45978e89c953 /src/libstd/rt | |
| parent | 0d7799d3048eea4039d59c0cca98449e1c52a561 (diff) | |
| download | rust-5b40f2ae5b4357a9488bd97da011bd07aebf6aaa.tar.gz rust-5b40f2ae5b4357a9488bd97da011bd07aebf6aaa.zip | |
pass exchange_malloc an alignment, not a tydesc
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/global_heap.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libstd/rt/global_heap.rs b/src/libstd/rt/global_heap.rs index 1e0ad3352fe..1020580d52c 100644 --- a/src/libstd/rt/global_heap.rs +++ b/src/libstd/rt/global_heap.rs @@ -80,13 +80,8 @@ 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(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); +pub unsafe fn 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 } |
