18#ifndef TEUCHOS_DETAILS_ALLOCATOR 
   19#define TEUCHOS_DETAILS_ALLOCATOR 
  166  bool tracking ()
 const { 
return track_; }
 
  169  bool verbose ()
 const { 
return verbose_; }
 
  211#ifdef HAVE_TEUCHOSCORE_CXX11 
  237    track_ (
src.tracking ()), verbose_ (
src.verbose ())
 
 
  257    return std::numeric_limits<size_type>::max();
 
 
  273    return (
value_type*) (::operator 
new (n * 
sizeof (
T)));
 
 
  288    ::operator 
delete ((
void*) 
p);
 
 
  301#ifndef HAVE_TEUCHOSCORE_CXX11 
  314    new ((
void*) 
p) 
T (
val);
 
 
  318#ifndef HAVE_TEUCHOSCORE_CXX11 
 
  346template<
class T, 
class U>
 
  352template<
class T, 
class U>
 
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
 
Logging implementation used by Allocator (see below).
 
static void resetAllocationCounts()
Reset the current and max total allocation numbers to zero.
 
static size_type curAllocInBytes()
Current total allocation in bytes.
 
static void logAllocation(std::ostream &out, const size_type numEntries, const size_type numBytes, const char typeName[], const bool verbose)
Log an allocation.
 
static size_type maxAllocInBytes()
Max total allocation ("high water mark") in bytes.
 
std::size_t size_type
Type of the size of an allocation or deallocation.
 
static void logDeallocation(std::ostream &out, const size_type numEntries, const size_type numBytes, const char typeName[], const bool verbose)
Log a deallocation, that was previously logged using logAllocation().
 
Optional tracking allocator for Teuchos Memory Management classes.
 
size_type curAllocInBytes()
Current total allocation in bytes, over all Allocator.
 
T & reference
Type of a reference to T.
 
std::ptrdiff_t difference_type
Integer type representing the difference between two pointers.
 
void construct(pointer p, const_reference val)
Invoke the constructor of an instance of T, without allocating.
 
const T * const_pointer
Type of a pointer to const T.
 
void deallocate(value_type *p, const size_type &n)
Deallocate n instances of value_type.
 
value_type * allocate(const size_type &n, const void *=0)
Allocate an array of n instances of value_type.
 
T value_type
Type of the template parameter of this class.
 
void destroy(pointer p)
Invoke the destructor of an instance of T, without deallocating.
 
Allocator(const bool trackMemory, const bool verboseOutput)
Constructor.
 
size_type max_size() const
Upper bound (possibly loose) on maximum allocation size.
 
T * pointer
Type of a pointer to T.
 
AllocationLogger::size_type size_type
Type of the size of an allocation or deallocation.
 
Allocator(const Allocator< U > &src)
Copy constructor that takes an Allocator for any U.
 
size_type maxAllocInBytes()
Max total allocation ("high water mark") in bytes, over all Allocator.
 
Allocator()
Default constructor.
 
const T & const_reference
Type of a reference to const T.
 
Smart reference counting pointer class for automatic garbage collection.
 
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
 
Namespace of implementation details.
 
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
 
Mapping to an Allocator for a different type U.