Skip to content

Commit 2d4f0d5

Browse files
committed
---
yaml --- r: 151527 b: refs/heads/try2 c: 121ad1c h: refs/heads/master i: 151525: 4891321 151523: 410d7c6 151519: 0f441a0 v: v3
1 parent e6344ec commit 2d4f0d5

File tree

10 files changed

+14
-15
lines changed

10 files changed

+14
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 87b658cf728b5d7e6b81012460454af634f6e6f8
8+
refs/heads/try2: 121ad1cb7db6517ed2aabc9c1514a99f5eb95149
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcollections/hashmap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ mod table {
4242
use std::prelude::Drop;
4343
use std::ptr;
4444
use std::ptr::RawPtr;
45-
use std::rt::global_heap;
45+
use std::rt::libc_heap;
4646
use std::intrinsics::{size_of, min_align_of, transmute};
4747
use std::intrinsics::{move_val_init, set_memory};
4848
use std::iter::{Iterator, range_step_inclusive};
@@ -243,7 +243,7 @@ mod table {
243243
keys_size, min_align_of::< K >(),
244244
vals_size, min_align_of::< V >());
245245

246-
let buffer = global_heap::malloc_raw(size) as *mut u8;
246+
let buffer = libc_heap::malloc_raw(size) as *mut u8;
247247

248248
// FIXME #13094: If malloc was not at as aligned as we expected,
249249
// our offset calculations are just plain wrong. We could support

branches/try2/src/libnative/io/file_win32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ pub fn mkdir(p: &CString, _mode: io::FilePermission) -> IoResult<()> {
339339
}
340340

341341
pub fn readdir(p: &CString) -> IoResult<Vec<Path>> {
342-
use std::rt::global_heap::malloc_raw;
342+
use std::rt::libc_heap::malloc_raw;
343343

344344
fn prune(root: &CString, dirs: Vec<Path>) -> Vec<Path> {
345345
let root = unsafe { CString::new(root.with_ref(|p| p), false) };

branches/try2/src/librustuv/uvll.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
use libc::{size_t, c_int, c_uint, c_void, c_char, c_double};
3333
use libc::{ssize_t, sockaddr, free, addrinfo};
3434
use libc;
35-
use std::rt::global_heap::malloc_raw;
35+
use std::rt::libc_heap::malloc_raw;
3636

3737
#[cfg(test)]
3838
use libc::uintptr_t;

branches/try2/src/libstd/c_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ use str::StrSlice;
8181
use str;
8282
use slice::{ImmutableVector, MutableVector};
8383
use slice;
84-
use rt::global_heap::malloc_raw;
84+
use rt::libc_heap::malloc_raw;
8585
use raw::Slice;
8686

8787
/// The representation of a C String.

branches/try2/src/libstd/c_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ mod tests {
160160
use super::CVec;
161161
use libc;
162162
use ptr;
163-
use rt::global_heap::malloc_raw;
163+
use rt::libc_heap::malloc_raw;
164164

165165
fn malloc(n: uint) -> CVec<u8> {
166166
unsafe {

branches/try2/src/libstd/rt/local_heap.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use ops::Drop;
1818
use option::{Option, None, Some};
1919
use ptr;
2020
use ptr::RawPtr;
21-
use rt::global_heap;
21+
use rt::libc_heap;
2222
use rt::local::Local;
2323
use rt::task::Task;
2424
use raw;
@@ -188,7 +188,7 @@ impl MemoryRegion {
188188
fn malloc(&mut self, size: uint) -> *mut Box {
189189
let total_size = size + AllocHeader::size();
190190
let alloc: *AllocHeader = unsafe {
191-
global_heap::malloc_raw(total_size) as *AllocHeader
191+
libc_heap::malloc_raw(total_size) as *AllocHeader
192192
};
193193

194194
let alloc: &mut AllocHeader = unsafe { cast::transmute(alloc) };
@@ -207,8 +207,7 @@ impl MemoryRegion {
207207

208208
let total_size = size + AllocHeader::size();
209209
let alloc: *AllocHeader = unsafe {
210-
global_heap::realloc_raw(orig_alloc as *mut u8,
211-
total_size) as *AllocHeader
210+
libc_heap::realloc_raw(orig_alloc as *mut u8, total_size) as *AllocHeader
212211
};
213212

214213
let alloc: &mut AllocHeader = unsafe { cast::transmute(alloc) };

branches/try2/src/libstd/rt/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ language and an implementation must be provided regardless of the
2626
execution environment.
2727
2828
Of foremost importance is the global exchange heap, in the module
29-
`global_heap`. Very little practical Rust code can be written without
29+
`heap`. Very little practical Rust code can be written without
3030
access to the global heap. Unlike most of `rt` the global heap is
3131
truly a global resource and generally operates independently of the
3232
rest of the runtime.
@@ -86,8 +86,8 @@ pub mod shouldnt_be_public {
8686
// Internal macros used by the runtime.
8787
mod macros;
8888

89-
// The global (exchange) heap.
90-
pub mod global_heap;
89+
/// Wrappers around malloc / realloc aborting on out-of-memory.
90+
pub mod libc_heap;
9191

9292
/// The low-level memory allocation API.
9393
pub mod heap;

branches/try2/src/libstd/unstable/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ mod imp {
434434

435435
#[cfg(windows)]
436436
mod imp {
437-
use rt::global_heap::malloc_raw;
437+
use rt::libc_heap::malloc_raw;
438438
use libc::{HANDLE, BOOL, LPSECURITY_ATTRIBUTES, c_void, DWORD, LPCSTR};
439439
use libc;
440440
use ptr;

0 commit comments

Comments
 (0)