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.
This commit is contained in:
Eric Holk
2011-07-18 12:02:26 -07:00
committed by Brian Anderson
parent a44fb04d57
commit 3ae4dcd41e
24 changed files with 313 additions and 240 deletions

View File

@@ -112,7 +112,7 @@ rust_task : public maybe_proxy<rust_task>,
void link_gc(gc_alloc *gcm);
void unlink_gc(gc_alloc *gcm);
void *malloc(size_t sz, type_desc *td=0);
void *malloc(size_t sz, const char *tag, type_desc *td=0);
void *realloc(void *data, size_t sz, bool gc_mem=false);
void free(void *p, bool gc_mem=false);
@@ -157,7 +157,7 @@ rust_task : public maybe_proxy<rust_task>,
bool can_schedule(int worker);
void *calloc(size_t size);
void *calloc(size_t size, const char *tag);
void pin();
void pin(int id);