static uint32_t test_frame(uintptr_t addr) { uintptr_t frame = addr/0x1000; uint32_t idx = INDEX_FROM_BIT(frame); uint32_t off = OFFSET_FROM_BIT(frame); return (frames[idx] & (0x1 << off)); }
void clear_frame(u32int frame_addr) { u32int frame = frame_addr / 0x1000; u32int idx = INDEX_FROM_BIT(frame); u32int off = OFFSET_FROM_BIT(frame); frames[idx] &= ~(0x1 << off); }
static void clear_frame(uintptr_t addr) { uintptr_t frame = addr/0x1000; uint32_t idx = INDEX_FROM_BIT(frame); uint32_t off = OFFSET_FROM_BIT(frame); frames[idx] &= ~(0x1 << off); }
u32int test_frame(u32int frame_addr) { u32int frame = frame_addr / 0x1000; u32int idx = INDEX_FROM_BIT(frame); u32int off = OFFSET_FROM_BIT(frame); return frames[idx] & (0x1 << off); }
/* Static function to test if a bit is set */ static unsigned int test_frame(addr frame_addr) { addr frame = frame_addr/0x1000; addr idx = INDEX_FROM_BIT(frame); addr off = OFFSET_FROM_BIT(frame); return (frames[idx] & (0x1 << off)); }
static void clear_frame(uint32_t frame_addr) { uint32_t frame = frame_addr/PAGE_SIZ; uint32_t idx = INDEX_FROM_BIT(frame); uint32_t off = OFFSET_FROM_BIT(frame); frames[idx] &= ~(0x1 << off); }
/* Static function to set a bit in the frames bitset */ static void set_frame(addr frame_addr) { addr frame = frame_addr/0x1000; addr idx = INDEX_FROM_BIT(frame); addr off = OFFSET_FROM_BIT(frame); frames[idx] |= (0x1 << off); }
static void clear_frame(uint32_t frame_addr) { uint32_t frame=frame_addr/0x1000; uint32_t idx=INDEX_FROM_BIT(frame); uint32_t offset=OFFSET_FROM_BIT(frame); frames[idx] &= ( ~(1<<offset) ); }
static uint32_t test_frame(uint32_t frame_addr) { uint32_t frame=frame_addr/0x1000; uint32_t idx=INDEX_FROM_BIT(frame); uint32_t offset=OFFSET_FROM_BIT(frame); return frames[idx] & (1<<offset); }
static void set_frame(uint32_t frame_addr) { uint32_t frame = frame_addr / 0x1000; uint32_t idx = INDEX_FROM_BIT(frame); uint32_t off = OFFSET_FROM_BIT(frame); _pages[idx] |= (0x1 << off); }
static void set_frame(uint32_t frame_addr) { off_t off; uint32_t idx, frame; frame = frame_addr/PAGE_SIZ; idx = INDEX_FROM_BIT(frame); off = OFFSET_FROM_BIT(frame); frames[idx] |= (0x1 << off); }
// Static function to test if a bit is set. inline bool operator[]( const size_t &pos ) const { //static u32int test_frame(u32int frame_addr) //{ // uint32_t frame = frame_addr/0x1000; const uint32_t idx = INDEX_FROM_BIT(pos); const uint32_t off = OFFSET_FROM_BIT(pos); return (base[idx] & (0x1 << off)); //} }
static void set_frame(uintptr_t addr) { if(addr < nframes * 0x1000) { uint32_t frame = addr/0x1000; uint32_t idx = INDEX_FROM_BIT(frame); uint32_t off = OFFSET_FROM_BIT(frame); frames[idx] |= (0x1 << off); } }
inline void clear( const size_t &pos ){ // uint32_t frame = frame_addr/0x1000; const uint32_t idx = INDEX_FROM_BIT(pos); const uint32_t off = OFFSET_FROM_BIT(pos); base[idx] &= ~(0x1 << off); }
inline void set( const size_t &pos ){ // u32int frame = frame_addr/0x1000; const uint32_t idx = INDEX_FROM_BIT(pos); const uint32_t off = OFFSET_FROM_BIT(pos); base[idx] |= (0x1 << off); }
/** * Set a bit in the frames bitset as used. * * @param frame Offset into the array */ static inline void set_frame(unsigned int frame) { unsigned int idx = INDEX_FROM_BIT(frame); unsigned int off = OFFSET_FROM_BIT(frame); frames[idx] |= (0x1 << off); }