Skip to content
Snippets Groups Projects
Commit 3aaa1552 authored by Oliver Sander's avatar Oliver Sander
Browse files

remove deprecated class ISTLAllocator

[[Imported from SVN: r1500]]
parent 08799aeb
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
# Process this file with autoconf to produce a configure script.
DUNE_AC_INIT # gets module version from dune.module file
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([dune/istl/allocator.hh])
AC_CONFIG_SRCDIR([dune/istl/istlexception.hh])
AM_CONFIG_HEADER([config.h])
# check all dune-module stuff
......
......@@ -3,8 +3,7 @@
SUBDIRS = . tutorial test paamg
istldir = $(includedir)/dune/istl
istl_HEADERS = allocator.hh \
basearray.hh \
istl_HEADERS = basearray.hh \
bcrsmatrix.hh \
bdmatrix.hh \
btdmatrix.hh \
......
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_ALLOCATOR_HH
#define DUNE_ALLOCATOR_HH
#warning The header file allocator.hh is deprecated. Please use std::allocator instead of ISTLAllocator!
#include <cstddef>
#include <cstdlib>
namespace Dune {
/**
@addtogroup ISTL
@{
*/
/**
\brief 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
*/
class ISTLAllocator { // uses new and delete
public:
//! The size type
typedef std::size_t size_type;
//! The difference type to meassure the distance between two pointers
typedef std::ptrdiff_t difference_type;
//! allocate array of nmemb objects of type T
template<class T>
static T* malloc (size_type nmemb)
{
T* p = new T[nmemb];
return p;
}
//! release memory previously allocated with malloc member
template<class T>
static void free (T* p)
{
delete [] p;
}
};
/** @} end documentation */
} // end namespace
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment