Default allocator for ISTL. More...

#include <dune/istl/allocator.hh>

List of all members.

Public Types

typedef std::size_t size_type
 The size type.
typedef std::ptrdiff_t difference_type
 The difference type to meassure the distance between two pointers.

Static Public Member Functions

template<class T >
static T * malloc (size_type nmemb)
 allocate array of nmemb objects of type T
template<class T >
static void free (T *p)
 release memory previously allocated with malloc member

Detailed Description

Default allocator for ISTL.

The default allocator for the sparse matrix vector classes:

  • uses malloc and free
  • member templates for type safety to the outside
    • is a singleton
    • illustrates state handling through counter
    • throws std::bad_alloc just as new does

Member Typedef Documentation

typedef std::ptrdiff_t Dune::ISTLAllocator::difference_type

The difference type to meassure the distance between two pointers.

typedef std::size_t Dune::ISTLAllocator::size_type

The size type.


Member Function Documentation

template<class T >
static void Dune::ISTLAllocator::free ( T *  p  )  [inline, static]

release memory previously allocated with malloc member

template<class T >
static T* Dune::ISTLAllocator::malloc ( size_type  nmemb  )  [inline, static]

allocate array of nmemb objects of type T


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

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].