46 { __atomic_store_n(&_free_hint, hint, __ATOMIC_RELAXED); }
49 bool is_allocated(
long item)
const noexcept
50 {
return _bits[item]; }
52 long hint()
const {
return __atomic_load_n(&_free_hint, __ATOMIC_RELAXED); }
54 bool alloc(
long item)
noexcept
59 void free(
long item)
noexcept
68 : _capacity(size), _free_hint(0), _bits(mem)
73 long free_hint = hint();
75 for (
long i = free_hint; i < _capacity; ++i)
84 for (
long i = 0; i < free_hint && i < _capacity; ++i)
94 long size()
const noexcept