mirror of
https://github.com/matrix-construct/construct
synced 2024-11-10 12:01:15 +01:00
ircd::ctx: Use vg::stack registration in stack allocator.
This commit is contained in:
parent
f6bc11b76a
commit
dc388a0f09
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue