mirror of
https://github.com/matrix-construct/construct
synced 2024-11-15 22:41:12 +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
|
### Foundation
|
||||||
|
|
||||||
This library is based in `boost::coroutine / boost::context` which wraps
|
This library is embedded around `boost::coroutine / boost::context`.
|
||||||
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.
|
|
||||||
|
|
||||||
`boost::asio` has then added its own comprehensive integration with the above
|
`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
|
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;
|
c.sp = ircd::data(buf) + c.size;
|
||||||
|
|
||||||
#if defined(BOOST_USE_VALGRIND)
|
#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
|
#endif
|
||||||
|
|
||||||
this->owner = bool(umb);
|
this->owner = bool(umb);
|
||||||
|
@ -3164,7 +3165,8 @@ ircd::ctx::stack::allocator::deallocate(stack_context &c)
|
||||||
assert(c.sp);
|
assert(c.sp);
|
||||||
|
|
||||||
#if defined(BOOST_USE_VALGRIND)
|
#if defined(BOOST_USE_VALGRIND)
|
||||||
VALGRIND_STACK_DEREGISTER(c.valgrind_stack_id)
|
if(vg::active)
|
||||||
|
vg::stack::del(c.valgrind_stack_id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const auto base
|
const auto base
|
||||||
|
|
Loading…
Reference in a new issue