diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2011-12-13 16:53:10 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2011-12-14 14:32:24 -0800 |
| commit | f512e67fb97bf9d1cbf9337c8c6e877c91faea06 (patch) | |
| tree | c2910536156c32d605a67c77fbbf4efb29f3f231 /src/rt/rust_upcall.cpp | |
| parent | 85f381fb8ac129878ce0e9139c9fa01390a1265e (diff) | |
| download | rust-f512e67fb97bf9d1cbf9337c8c6e877c91faea06.tar.gz rust-f512e67fb97bf9d1cbf9337c8c6e877c91faea06.zip | |
clone type desc into exchange heap
Diffstat (limited to 'src/rt/rust_upcall.cpp')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index d91e282d2e2..754a1f2d189 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -202,11 +202,14 @@ struct s_clone_type_desc_args { void upcall_s_clone_type_desc(s_clone_type_desc_args *args) { + rust_task *task = rust_scheduler::get_task(); + LOG_UPCALL_ENTRY(task); + // Copy the main part of the type descriptor: const type_desc *td = args->td; int n_descs = td->n_descs; size_t sz = sizeof(type_desc) + sizeof(type_desc*) * n_descs; - args->res = (type_desc*) malloc(sz); + args->res = (type_desc*) task->kernel->malloc(sz, "clone_type_desc"); memcpy(args->res, td, sizeof(type_desc)); // Recursively copy any referenced descriptors: |
