NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CapAllocatorAtomic< BITS > Class Template Reference

#include <capalloc.h>

Inheritance diagram for CapAllocatorAtomic< BITS >:
CapAllocatorAtomicPartition< BITS > CapAllocatorAtomicPartition< 1<< CONST_CAP_RANGE > ab::AdmissionService EventService

Public Member Functions

 CapAllocatorAtomic (cap_sel _cap_start=~0UL)
unsigned idx_max () const
unsigned bytes_max () const
cap_sel idx_smallest ()
cap_sel alloc_cap (unsigned count=1)
void dealloc_cap (cap_sel cap, unsigned count=1)

Protected Types

enum  { BITS_PER_CHAR = 8, BITS_PER_UNSIGNED = sizeof(unsigned)*8, BYTES_PER_UNSIGNED = sizeof(unsigned) }

Protected Member Functions

cap_sel internal_alloc_cap (unsigned count=1, unsigned byte_start=0)

Protected Attributes

unsigned volatile _bits [(BITS+BITS_PER_UNSIGNED-1)/BITS_PER_UNSIGNED]
cap_sel _cap_base

Member Enumeration Documentation

template<unsigned BITS>
anonymous enum
protected
Enumerator:
BITS_PER_CHAR 
BITS_PER_UNSIGNED 
BYTES_PER_UNSIGNED 

Constructor & Destructor Documentation

template<unsigned BITS>
CapAllocatorAtomic< BITS >::CapAllocatorAtomic ( cap_sel  _cap_start = ~0UL)
inline

Member Function Documentation

template<unsigned BITS>
cap_sel CapAllocatorAtomic< BITS >::alloc_cap ( unsigned  count = 1)
inline
template<unsigned BITS>
unsigned CapAllocatorAtomic< BITS >::bytes_max ( ) const
inline
template<unsigned BITS>
void CapAllocatorAtomic< BITS >::dealloc_cap ( cap_sel  cap,
unsigned  count = 1 
)
inline

Reimplemented in ab::AdmissionService, and EventService.

template<unsigned BITS>
unsigned CapAllocatorAtomic< BITS >::idx_max ( ) const
inline
template<unsigned BITS>
cap_sel CapAllocatorAtomic< BITS >::idx_smallest ( )
inline
template<unsigned BITS>
cap_sel CapAllocatorAtomic< BITS >::internal_alloc_cap ( unsigned  count = 1,
unsigned  byte_start = 0 
)
inlineprotected

Member Data Documentation

template<unsigned BITS>
unsigned volatile CapAllocatorAtomic< BITS >::_bits[(BITS+BITS_PER_UNSIGNED-1)/BITS_PER_UNSIGNED]
protected
template<unsigned BITS>
cap_sel CapAllocatorAtomic< BITS >::_cap_base
protected

The documentation for this class was generated from the following file: