From 2c1ec6771bd09266308686ab13ca32e2aa73da49 Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Tue, 17 Aug 2010 23:40:07 -0700 Subject: 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. --- src/rt/rust_internal.h | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/rt/rust_internal.h') diff --git a/src/rt/rust_internal.h b/src/rt/rust_internal.h index 67787719..d6618873 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 -- cgit v1.2.3