28 #include <l4/cxx/bitmap> 30 namespace L4Re {
namespace Util {
46 bool is_allocated(
long item)
const throw()
47 {
return _bits[item]; }
49 long hint()
const {
return _free_hint; }
51 bool alloc(
long item)
throw()
61 void free(
long item)
throw()
63 if (item < _free_hint)
70 : _capacity(size), _free_hint(0), _bits(mem)
75 if (_free_hint >= _capacity)
78 long free = _bits.
scan_zero(_capacity, _free_hint);
87 long size()
const throw()
void clear_bit(long bit)
Clear bit bit.
void set_bit(long bit)
Set bit bit.
long scan_zero(long max_bit, long start_bit=0) const
Scan for the first zero bit.
Helper abstraction for a word contained in the bitmap.
Basic bitmap abstraction.