Skip to content

Commit d155410

Browse files
committed
rt: Make the boxed region come earlier in the rust_task structure.
This is so that GC can find it more easily.
1 parent 2d116cb commit d155410

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/rt/rust_task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ rust_task::rust_task(rust_sched_loop *sched_loop, rust_task_state state,
2323
name(name),
2424
list_index(-1),
2525
rendezvous_ptr(0),
26-
local_region(&sched_loop->local_region),
2726
boxed(sched_loop->kernel->env, &local_region),
27+
local_region(&sched_loop->local_region),
2828
unwinding(false),
2929
cc_counter(0),
3030
total_stack_sz(0),

src/rt/rust_task.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ rust_task : public kernel_owned<rust_task>
214214
// that location before waking us up.
215215
uintptr_t* rendezvous_ptr;
216216

217-
memory_region local_region;
218217
boxed_region boxed;
218+
memory_region local_region;
219219

220220
// Indicates that fail() has been called and we are cleaning up.
221221
// We use this to suppress the "killed" flag during calls to yield.

0 commit comments

Comments
 (0)