diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-01-13 16:53:13 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-02-06 14:27:36 -0800 |
| commit | e43c5bdc6b47e8dd5e2ddcd6cf57fec79388523a (patch) | |
| tree | 309c89fe29131346dc5e258e2dd948c381ec256d /src/rt/rust_kernel.cpp | |
| parent | e91040c704aa9ab46fb1c7a10e293fd5f6bfe079 (diff) | |
| download | rust-e43c5bdc6b47e8dd5e2ddcd6cf57fec79388523a.tar.gz rust-e43c5bdc6b47e8dd5e2ddcd6cf57fec79388523a.zip | |
Rewrite the exchange allocator to work without an active scheduler. #4457
Diffstat (limited to 'src/rt/rust_kernel.cpp')
| -rw-r--r-- | src/rt/rust_kernel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index 99a6ed94944..e0494c9300b 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -22,7 +22,6 @@ KLOG_LVL(this, field, log_err, __VA_ARGS__) rust_kernel::rust_kernel(rust_env *env) : - _region(env, true), _log(NULL), max_task_id(INIT_TASK_ID-1), // sync_add_and_fetch increments first rval(0), @@ -77,21 +76,21 @@ rust_kernel::fatal(char const *fmt, ...) { void * rust_kernel::malloc(size_t size, const char *tag) { - return _region.malloc(size, tag); + return exchange_alloc.malloc(size); } void * rust_kernel::calloc(size_t size, const char *tag) { - return _region.calloc(size, tag); + return exchange_alloc.calloc(size); } void * rust_kernel::realloc(void *mem, size_t size) { - return _region.realloc(mem, size); + return exchange_alloc.realloc(mem, size); } void rust_kernel::free(void *mem) { - _region.free(mem); + exchange_alloc.free(mem); } rust_sched_id @@ -217,6 +216,7 @@ rust_kernel::run() { assert(osmain_driver != NULL); osmain_driver->start_main_loop(); sched_reaper.join(); + rust_check_exchange_count_on_exit(); return rval; } |
