Commit Graph

34 Commits

Author SHA1 Message Date
Brian Anderson
2fe118b26f rt: Don't make memory_region depend on rust_env
I am going to use memory_region and boxed_region as the local heap
in the new scheduler, for now at least, and I don't have a rust_env
available.
2013-04-21 17:42:45 -07:00
Daniel Micay
1a41b484bf rm the unused calloc wrapper from memory_region
it doesn't actually call calloc, so it's fairly pointless
2013-02-14 18:28:04 -05:00
Brian Anderson
7f8e302a6a Whitespace 2012-12-15 23:03:45 -08:00
Jesse Jones
e8d2d55900 Made a bunch more classes non-copyable 2012-12-15 22:38:20 -08:00
Graydon Hoare
12c32e944d Add license boilerplate to more files. 2012-12-10 17:32:58 -08:00
Graydon Hoare
312faf31df Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this. 2012-06-21 16:44:10 -07:00
Tim Chevalier
c814df0bd6 Comments only: annotate FIXMEs 2012-06-21 16:03:28 -07:00
Jon Morton
632a4c9326 Refactor includes structure, getting rid of rust_internal.h
Many changes to code structure are included:
- removed TIME_SLICE_IN_MS
- removed sychronized_indexed_list
- removed region_owned
- kernel_owned move to kernel.h, task_owned moved to task.h
- global configs moved to rust_globals.h
- changed #pragma once to standard guard in rust_upcall.h
- got rid of memory.h
2012-04-03 16:02:38 -07:00
Brian Anderson
bee45f0ef0 rt: rust_env is a struct 2012-04-01 21:07:42 -07:00
Jon Morton
128a8b6ed5 remove rust_srv 2012-04-01 22:18:40 -05:00
Brian Anderson
21064637ed rt: Fix whitespace 2012-03-31 23:12:06 -07:00
Brian Anderson
b17145b4ae rt: Track backtraces of all allocations with RUSTRT_TRACK_ALLOCATIONS=3 2012-03-29 16:43:18 -07:00
Brian Anderson
3a4c96a196 rt: Remove virtual methods from memory_region, rust_srv 2012-03-05 14:47:24 -08:00
Niko Matsakis
196d69beb2 make boxes self-describing (fixes #1493)" (take 2)
this will be used to generate a new snapshot.
2012-02-01 18:52:08 -08:00
Niko Matsakis
3116643806 Revert "make boxes self-describing (fixes #1493)" until a new
snapshot is prepared.
2012-02-01 18:50:19 -08:00
Niko Matsakis
c36207bfb8 make boxes self-describing (fixes #1493) 2012-02-01 18:18:07 -08:00
Niko Matsakis
35fe86dab7 export upcall_clone_type_desc 2011-12-14 14:32:25 -08:00
Niko Matsakis
a98dec035f fix track alloc code 2011-12-12 18:25:17 -08:00
Niko Matsakis
e24d1dd6f5 rewrite so that memory allocations have 0 overhead by default 2011-11-08 21:11:47 -08:00
Niko Matsakis
75b98a9076 Correct the arithmetic on 64-bit builds. 2011-11-08 21:11:47 -08:00
Brian Anderson
22001d1dce Remove hack_allow_leaks
Happy to close the loop on this one.

Issue #236
2011-09-11 17:31:40 -07:00
Patrick Walton
d3e8887d3c rt: Implement poison-on-free, for debugging memory issues 2011-09-06 14:15:01 -07:00
Eric Holk
b9f1f77622 Fixed memory accounting and task stack creation bugs. 2011-08-15 09:26:51 -07:00
Patrick Walton
0459e38bde rt: Align mallocs to 16 byte boundaries 2011-08-08 17:30:21 -07:00
Eric Holk
3ae4dcd41e 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.
2011-07-21 11:51:22 -07:00
Brian Anderson
a467e8e4e6 Add a huge hack to allow the test runner to continue if a single task leaks
This is just until unwinding works. Adds a flag to the runtime to turn
the memory leak checks on task destruction into warnings instead of fatal
errors. I am so sorry.

Issue #428
2011-07-20 10:22:18 -07:00
Graydon Hoare
49116adbe9 Fix compile-command lines in rt. 2011-07-13 13:51:20 -07:00
Eric Holk
8acadb17c2 Work on debugging race conditions.
Ports and channels have been moved to the kernel pool, since they've
been known to outlive their associated task. This probably isn't the
right thing to do, the life cycle needs fixed instead.

Some refactorying in memory_region.cpp. Added a helper function to
increment and decrement the allocation counter. This makes it easier
to switch between atomic and non-atomic increments. Using atomic
increments for now, although this still does not fix the problem.
2011-07-07 18:22:27 -07:00
Eric Holk
dcd2563a3a Removing the synchronized memory region from tasks. 2011-07-07 18:22:27 -07:00
Graydon Hoare
bc9fa31618 A little tidying in rt. 2011-06-27 10:08:57 -07:00
Graydon Hoare
4dc98e54d1 Make the ugly detailed leak-spray on rustc failures optional. 2010-11-30 17:10:51 -08:00
Graydon Hoare
616b7afb72 Tidy up the sync dir, remove dead or mis-designed code in favour of OS primitives, switch rust_kernel to use a lock/signal pair and wait rather than spin. 2010-09-08 19:13:49 -07:00
Michael Bebenita
6b7ba50e17 Added "new" inline operators to memory regions. 2010-09-07 18:41:08 -07:00
Michael Bebenita
2c1ec6771b Lots of changes around memory managment in the Runtime. Added memory regions and fixed race caused by calling rust_srv::malloc() from multiple threads when sending messages. 2010-08-17 23:49:57 -07:00