diff options
| author | Michael Bebenita <mbebenita@mozilla.com> | 2010-08-17 23:40:07 -0700 |
|---|---|---|
| committer | Michael Bebenita <mbebenita@mozilla.com> | 2010-08-17 23:49:57 -0700 |
| commit | 2c1ec6771bd09266308686ab13ca32e2aa73da49 (patch) | |
| tree | acbcae9da89c0f6d37fccdf8b4091f003e798683 /src/rt/rust_internal.h | |
| parent | 9fa2b53d8c41cd717ed470926a746bdbff98dc35 (diff) | |
| download | rust-2c1ec6771bd09266308686ab13ca32e2aa73da49.tar.gz rust-2c1ec6771bd09266308686ab13ca32e2aa73da49.zip | |
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.
Diffstat (limited to 'src/rt/rust_internal.h')
| -rw-r--r-- | src/rt/rust_internal.h | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/rt/rust_internal.h b/src/rt/rust_internal.h index 67787719444..d6618873dff 100644 --- a/src/rt/rust_internal.h +++ b/src/rt/rust_internal.h @@ -173,25 +173,7 @@ check_null(rust_dom *dom, T value, char const *expr, #define CHECK_NULL(dom, e) (check_null(dom, e, #e, __FILE__, __LINE__)) -inline void *operator new(size_t sz, void *mem) { - return mem; -} - -inline void *operator new(size_t sz, rust_dom *dom) { - return dom->malloc(sz); -} - -inline void *operator new[](size_t sz, rust_dom *dom) { - return dom->malloc(sz); -} - -inline void *operator new(size_t sz, rust_dom &dom) { - return dom.malloc(sz); -} - -inline void *operator new[](size_t sz, rust_dom &dom) { - return dom.malloc(sz); -} +#include "memory.h" struct rust_timer |
