mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Fixed build with jemalloc disabled
This commit is contained in:
parent
3a96d6a981
commit
d0bb57cfc3
@ -300,7 +300,7 @@ mod imp {
|
|||||||
libc::realloc(ptr as *mut libc::c_void, size as libc::size_t) as *mut u8
|
libc::realloc(ptr as *mut libc::c_void, size as libc::size_t) as *mut u8
|
||||||
} else {
|
} else {
|
||||||
let new_ptr = allocate(size, align);
|
let new_ptr = allocate(size, align);
|
||||||
ptr::copy_memory(new_ptr, ptr, cmp::min(size, old_size));
|
ptr::copy(new_ptr, ptr, cmp::min(size, old_size));
|
||||||
deallocate(ptr, old_size, align);
|
deallocate(ptr, old_size, align);
|
||||||
new_ptr
|
new_ptr
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user