- Home
- About DUNE
- Download
- Documentation
- Community
- Development
00001 #ifndef DUNE_ALLOCATOR_HH 00002 #define DUNE_ALLOCATOR_HH 00003 00004 #warning The header file allocator.hh is deprecated. Please use std::allocator instead of ISTLAllocator! 00005 00006 #include <cstddef> 00007 #include <cstdlib> 00008 00009 00010 namespace Dune { 00011 00029 class ISTLAllocator { // uses new and delete 00030 public: 00032 typedef std::size_t size_type; 00033 00035 typedef std::ptrdiff_t difference_type; 00036 00038 template<class T> 00039 static T* malloc (size_type nmemb) 00040 { 00041 T* p = new T[nmemb]; 00042 return p; 00043 } 00044 00046 template<class T> 00047 static void free (T* p) 00048 { 00049 delete [] p; 00050 } 00051 }; 00052 00055 } // end namespace 00056 00057 #endif
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].