0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 16:34:13 +01:00

ircd::allocator: Assertions on state bits.

This commit is contained in:
Jason Volk 2018-04-08 10:36:24 -07:00
parent dcd343356d
commit a9cdab1e49

View file

@ -407,7 +407,10 @@ ircd::allocator::state::deallocate(const uint &pos,
const size_type &n)
{
for(size_t i(0); i < n; ++i)
{
assert(test(pos + i));
btc(pos + i);
}
last = pos;
}
@ -421,7 +424,10 @@ ircd::allocator::state::allocate(const size_type &n,
throw std::bad_alloc();
for(size_t i(0); i < n; ++i)
{
assert(!test(next + i));
bts(next + i);
}
last = next + n;
return next;