about summary refs log tree commit diff
path: root/src/rt/rust_crate_cache.cpp
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-07-18 12:02:26 -0700
committerBrian Anderson <banderson@mozilla.com>2011-07-21 11:51:22 -0700
commit3ae4dcd41e72d197e3882835253745f79588b04a (patch)
tree38b0fa41afe156057c8913f779fda2e4ca0b08ac /src/rt/rust_crate_cache.cpp
parenta44fb04d57400f70ad58c1e35fc9dd9a7c43de07 (diff)
downloadrust-3ae4dcd41e72d197e3882835253745f79588b04a.tar.gz
rust-3ae4dcd41e72d197e3882835253745f79588b04a.zip
Lots of work on memory tracking and channels.
We're trying to get closer to doing correct move semantics for channel
operations. This involves a lot of cleanup (such as removing the
unused sched parameter from rust_vec constructor) and making
circular_buffer kernel_owned.

Added tagging for memory allocations. This means we give a string tag
to everything we allocate. If we leak something and TRACK_ALLOCATIONS
is enabled, then it's much easier now to tell exactly what is leaking.
Diffstat (limited to 'src/rt/rust_crate_cache.cpp')
-rw-r--r--src/rt/rust_crate_cache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rt/rust_crate_cache.cpp b/src/rt/rust_crate_cache.cpp
index e09e2db9954..953430beb68 100644
--- a/src/rt/rust_crate_cache.cpp
+++ b/src/rt/rust_crate_cache.cpp
@@ -16,7 +16,8 @@ rust_crate_cache::get_type_desc(size_t size,
         return td;
     }
     DLOG(sched, cache, "rust_crate_cache::get_type_desc miss");
-    td = (type_desc*) sched->kernel->malloc(sizeof(type_desc) + keysz);
+    td = (type_desc*) sched->kernel->malloc(sizeof(type_desc) + keysz,
+                                            "crate cache typedesc");
     if (!td)
         return NULL;
     // By convention, desc 0 is the root descriptor.