From 9ef4c413a869b4fc1e5df3f79f484b2ffd46cda0 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 17 Jun 2013 23:18:20 -0700 Subject: std::rt: Check exchange count on exit --- src/libstd/rt/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libstd/rt/mod.rs') diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 10b5c78f99e..0a269aa8767 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -176,6 +176,8 @@ pub fn start(_argc: int, _argv: **u8, crate_map: *u8, main: ~fn()) -> int { sched.enqueue_task(main_task); sched.run(); + cleanup(); + return 0; } @@ -185,6 +187,10 @@ pub fn init(crate_map: *u8) { logging::init(crate_map); } +pub fn cleanup() { + global_heap::cleanup(); +} + /// Possible contexts in which Rust code may be executing. /// Different runtime services are available depending on context. /// Mostly used for determining if we're using the new scheduler -- cgit 1.4.1-3-g733a5