MCPcopy Create free account
hub / github.com/ConorWilliams/libfork / set_next

Method set_next

include/libfork/core/impl/stack.hpp:128–131  ·  view source on GitHub ↗

* @brief Set the next stacklet in the chain to 'new_next'. * * This requires that this is the top stacklet. If there is a cached stacklet ahead of the top stacklet * then it will be freed before being replaced with 'new_next'. */

Source from the content-addressed store, hash-verified

126 * then it will be freed before being replaced with 'new_next'.
127 */
128 void set_next(stacklet *new_next) noexcept {
129 LF_ASSERT(is_top());
130 std::free(std::exchange(m_next, new_next)); // NOLINT
131 }
132 /**
133 * @brief Allocate a new stacklet with a stack of size of at least`size` and attach it to the given
134 * stacklet chain.

Callers 3

next_stackletMethod · 0.45
~stackMethod · 0.45
deallocateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected