Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

CapAllocatorAtomic< BITS, error_doublefree > Class Template Reference

#include <capalloc.h>

Inheritance diagram for CapAllocatorAtomic< BITS, error_doublefree >:
CapAllocatorAtomicPartition< BITS, error_doublefree >

List of all members.

Public Member Functions

 CapAllocatorAtomic (unsigned long __cap_start=~0UL)
unsigned alloc_cap (unsigned count=1)
void dealloc_cap (unsigned cap, unsigned count=1)

Protected Types

enum  { BITS_PER_CHAR = 8, BITS_PER_INT = 32, BYTES_PER_INT = 4 }

Protected Member Functions

unsigned idx_max () const
unsigned bytes_max () const
unsigned __alloc_cap (unsigned count=1, unsigned byte_start=0)

Protected Attributes

union {
   unsigned volatile   a [(BITS+BITS_PER_INT-1)/BITS_PER_INT]
   void *   p
_bits
unsigned long _cap_base

template<unsigned BITS, bool error_doublefree = true>
class CapAllocatorAtomic< BITS, error_doublefree >


Member Enumeration Documentation

template<unsigned BITS, bool error_doublefree = true>
anonymous enum [protected]
Enumerator:
BITS_PER_CHAR 
BITS_PER_INT 
BYTES_PER_INT 

Constructor & Destructor Documentation

template<unsigned BITS, bool error_doublefree = true>
CapAllocatorAtomic< BITS, error_doublefree >::CapAllocatorAtomic ( unsigned long  __cap_start = ~0UL  )  [inline]

Member Function Documentation

template<unsigned BITS, bool error_doublefree = true>
unsigned CapAllocatorAtomic< BITS, error_doublefree >::__alloc_cap ( unsigned  count = 1,
unsigned  byte_start = 0 
) [inline, protected]
template<unsigned BITS, bool error_doublefree = true>
unsigned CapAllocatorAtomic< BITS, error_doublefree >::alloc_cap ( unsigned  count = 1  )  [inline]
template<unsigned BITS, bool error_doublefree = true>
unsigned CapAllocatorAtomic< BITS, error_doublefree >::bytes_max (  )  const [inline, protected]
template<unsigned BITS, bool error_doublefree = true>
void CapAllocatorAtomic< BITS, error_doublefree >::dealloc_cap ( unsigned  cap,
unsigned  count = 1 
) [inline]
template<unsigned BITS, bool error_doublefree = true>
unsigned CapAllocatorAtomic< BITS, error_doublefree >::idx_max (  )  const [inline, protected]

Member Data Documentation

union { ... } CapAllocatorAtomic< BITS, error_doublefree >::_bits [protected]
template<unsigned BITS, bool error_doublefree = true>
unsigned long CapAllocatorAtomic< BITS, error_doublefree >::_cap_base [protected]
template<unsigned BITS, bool error_doublefree = true>
unsigned volatile CapAllocatorAtomic< BITS, error_doublefree >::a[(BITS+BITS_PER_INT-1)/BITS_PER_INT]
template<unsigned BITS, bool error_doublefree = true>
void* CapAllocatorAtomic< BITS, error_doublefree >::p

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines