During a Stack_Begin(): A new Log is generated (Log2). The new stack (stack_local) points to the new log (Log2). The new log’s parent is set to the parent stack’s log’s pointer (Log1). The parent log’s sibling is set to the new log. To nest Log2 into Log1, after Stack_Begin() returns, Log1’s sibling pointer is cleared and child pointer set to Log2. |