20 #include "pedigree/kernel/utilities/ExtensibleBitmap.h" 21 #include "pedigree/kernel/utilities/utility.h" 24 : m_StaticMap(0), m_pDynamicMap(0), m_DynamicMapSize(0), m_nMaxBit(0),
25 m_nFirstSetBit(~0U), m_nFirstClearBit(0), m_nLastSetBit(~0U),
34 m_nFirstClearBit(other.m_nFirstClearBit),
35 m_nLastSetBit(other.m_nLastSetBit), m_nLastClearBit(other.m_nLastClearBit)
59 m_nFirstClearBit = other.m_nFirstClearBit;
60 m_nLastSetBit = other.m_nLastSetBit;
61 m_nLastClearBit = other.m_nLastClearBit;
78 if ((n > m_nLastSetBit) || (m_nLastSetBit == ~0U))
81 if (n == m_nFirstClearBit)
86 }
while (
test(m_nFirstClearBit));
101 if (n <
sizeof(uintptr_t) * 8)
107 n -=
sizeof(uintptr_t) * 8;
113 size_t sz = n / 8 + 8;
114 uint8_t *pMap =
new uint8_t[sz];
115 ByteSet(pMap, 0, sz);
133 if (n < m_nFirstClearBit)
134 m_nFirstClearBit = n;
138 for (
size_t i = n; i <=
sizeof(uintptr_t) * 8 +
m_nMaxBit; i++)
153 if (n == m_nLastSetBit)
158 for (
size_t i = n; i; i--)
167 if (n == m_nLastSetBit)
173 if (n <
sizeof(uintptr_t) * 8)
179 n -=
sizeof(uintptr_t) * 8;
189 if (n <
sizeof(uintptr_t) * 8)
192 n -=
sizeof(uintptr_t) * 8;
bool test(size_t n) const
ExtensibleBitmap & operator=(const ExtensibleBitmap &other)