Skip to content
Snippets Groups Projects
Commit c519f243 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

More clarity on CurrentAlloc docs.


Signed-off-by: default avatarEdward Z. Yang <ezyang@mit.edu>
parent 3e0109b3
No related merge requests found
......@@ -706,6 +706,28 @@ allocate (Capability *cap, W_ n)
// we have a block in the nursery: take it and put
// it at the *front* of the nursery list, and use it
// to allocate() from.
//
// Previously the nursery looked like this:
//
// CurrentNursery
// /
// +-+ +-+
// nursery -> ... |A| -> |B| -> ...
// +-+ +-+
//
// After doing this, it looks like this:
//
// CurrentNursery
// /
// +-+ +-+
// nursery -> |B| -> ... -> |A| -> ...
// +-+ +-+
// \
// CurrentAlloc
//
// The point is to get the block out of the way of the
// advancing CurrentNursery pointer, while keeping it
// on the nursery list so we don't lose track of it.
cap->r.rCurrentNursery->link = bd->link;
if (bd->link != NULL) {
bd->link->u.back = cap->r.rCurrentNursery;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment