diff options
| author | bors <bors@rust-lang.org> | 2014-10-25 20:57:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-25 20:57:10 +0000 |
| commit | f168c12c5629afd45c9b3ed250350bf830b99642 (patch) | |
| tree | c63b7afee6afdf35f857470a1878f40a86a6aadc /src/libstd | |
| parent | 80e5fe1a56bb95e8e89d5f8f0ff5122583bb5336 (diff) | |
| parent | a9e85100cd598ddb9395b2ad31b31e0f9df84f22 (diff) | |
auto merge of #18293 : thestinger/rust/heap, r=cmr
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/c_vec.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/mod.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/c_vec.rs b/src/libstd/c_vec.rs index 95f8ab72016..7ec25acb173 100644 --- a/src/libstd/c_vec.rs +++ b/src/libstd/c_vec.rs @@ -165,11 +165,11 @@ mod tests { use super::CVec; use libc; use ptr; - use rt::libc_heap::malloc_raw; fn malloc(n: uint) -> CVec<u8> { unsafe { - let mem = malloc_raw(n); + let mem = libc::malloc(n as libc::size_t); + if mem.is_null() { fail!("out of memory") } CVec::new_with_dtor(mem as *mut u8, n, proc() { libc::free(mem as *mut libc::c_void); }) diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 689bcdad131..a91c6c572e6 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -62,7 +62,7 @@ pub use self::util::{default_sched_threads, min_stack, running_on_valgrind}; // Reexport functionality from librustrt and other crates underneath the // standard library which work together to create the entire runtime. -pub use alloc::{heap, libc_heap}; +pub use alloc::heap; pub use rustrt::{task, local, mutex, exclusive, stack, args, rtio, thread}; pub use rustrt::{Stdio, Stdout, Stderr, begin_unwind, begin_unwind_fmt}; pub use rustrt::{bookkeeping, at_exit, unwind, DEFAULT_ERROR_CODE, Runtime}; |
