diff --git a/include/ircd/ctx/README.md b/include/ircd/ctx/README.md index e0928b4b5..3a7b86ba4 100644 --- a/include/ircd/ctx/README.md +++ b/include/ircd/ctx/README.md @@ -38,9 +38,7 @@ instruction boundaries rather than at cooperative boundaries. ### Foundation -This library is based in `boost::coroutine / boost::context` which wraps -the register save/restores in a cross-platform way in addition to providing -properly `mmap(NOEXEC)'ed` etc memory appropriate for stacks on each platform. +This library is embedded around `boost::coroutine / boost::context`. `boost::asio` has then added its own comprehensive integration with the above libraries eliminating the need for us to worry about a lot of boilerplate to diff --git a/ircd/ctx.cc b/ircd/ctx.cc index 18b4a96ee..420c49d24 100644 --- a/ircd/ctx.cc +++ b/ircd/ctx.cc @@ -3151,7 +3151,8 @@ ircd::ctx::stack::allocator::allocate(stack_context &c, c.sp = ircd::data(buf) + c.size; #if defined(BOOST_USE_VALGRIND) - c.valgrind_stack_id = VALGRIND_STACK_REGISTER(c.sp, ircd::data(buf)); + if(vg::active) + c.valgrind_stack_id = vg::stack::add(buf); #endif this->owner = bool(umb); @@ -3164,7 +3165,8 @@ ircd::ctx::stack::allocator::deallocate(stack_context &c) assert(c.sp); #if defined(BOOST_USE_VALGRIND) - VALGRIND_STACK_DEREGISTER(c.valgrind_stack_id) + if(vg::active) + vg::stack::del(c.valgrind_stack_id); #endif const auto base