aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/memory.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/util/memory.rs')
-rw-r--r--components/util/memory.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/util/memory.rs b/components/util/memory.rs
index 0c1d1dac3b1..278a5a448fb 100644
--- a/components/util/memory.rs
+++ b/components/util/memory.rs
@@ -5,6 +5,7 @@
//! Memory profiling functions.
use libc::{c_char,c_int,c_void,size_t};
+use std::borrow::ToOwned;
use std::io::timer::sleep;
#[cfg(target_os="linux")]
use std::io::File;
@@ -44,7 +45,7 @@ impl MemoryProfiler {
Some(period) => {
let period = Duration::milliseconds((period * 1000f64) as i64);
let chan = chan.clone();
- spawn_named("Memory profiler timer", proc() {
+ spawn_named("Memory profiler timer".to_owned(), proc() {
loop {
sleep(period);
if chan.send_opt(MemoryProfilerMsg::Print).is_err() {
@@ -53,7 +54,7 @@ impl MemoryProfiler {
}
});
// Spawn the memory profiler.
- spawn_named("Memory profiler", proc() {
+ spawn_named("Memory profiler".to_owned(), proc() {
let memory_profiler = MemoryProfiler::new(port);
memory_profiler.start();
});
@@ -61,7 +62,7 @@ impl MemoryProfiler {
None => {
// No-op to handle messages when the memory profiler is
// inactive.
- spawn_named("Memory profiler", proc() {
+ spawn_named("Memory profiler".to_owned(), proc() {
loop {
match port.recv_opt() {
Err(_) | Ok(MemoryProfilerMsg::Exit) => break,