From 3ae4dcd41e72d197e3882835253745f79588b04a Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Mon, 18 Jul 2011 12:02:26 -0700 Subject: 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. --- src/rt/rust_message.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/rt/rust_message.cpp') diff --git a/src/rt/rust_message.cpp b/src/rt/rust_message.cpp index 85b6ed6b089..59645d6d5bd 100644 --- a/src/rt/rust_message.cpp +++ b/src/rt/rust_message.cpp @@ -47,7 +47,8 @@ send(notification_type type, const char* label, rust_handle *source, rust_handle *target) { memory_region *region = &target->message_queue->region; notify_message *message = - new (region) notify_message(region, type, label, source, target); + new (region, "notify_message") + notify_message(region, type, label, source, target); target->message_queue->enqueue(message); } @@ -91,8 +92,8 @@ send(uint8_t *buffer, size_t buffer_sz, const char* label, memory_region *region = &port->message_queue->region; data_message *message = - new (region) data_message(region, buffer, buffer_sz, label, source, - port); + new (region, "data_message") + data_message(region, buffer, buffer_sz, label, source, port); LOG(source->referent(), comm, "==> sending \"%s\"" PTR " in queue " PTR, label, message, &port->message_queue); port->message_queue->enqueue(message); -- cgit 1.4.1-3-g733a5