alternative Standard Libary  0.29.8
std::pallocator Klassenreferenz

#include <pallocator.hpp>

Öffentliche Methoden

 allocator (const char *name="palloc")
 
 ~allocator ()
 
virtual void * allocate (unsigned int bytes, int flags=0)
 
virtual void * allocate_aligned (unsigned int bytes, unsigned int alignment, int flags=0)
 
virtual void deallocate (void *ptr, unsigned int bytes)
 
const char * get_name () const
 

Ausführliche Beschreibung

Beschreibung der Konstruktoren und Destruktoren

◆ ~allocator()

std::pallocator::~allocator ( )
inline
42 {}

Dokumentation der Elementfunktionen

◆ allocate()

virtual void* std::pallocator::allocate ( unsigned int  bytes,
int  flags = 0 
)
inlinevirtual
44  {
45  unsigned bnum = (unsigned) ((bytes + 1) / (PALLOC_SIZE * 1024)) + 1;
46  return palloc(bnum);
47  }
#define PALLOC_SIZE
Definition: palloc.h:40
void * palloc(size_t size)
allocated memory
Definition: palloc.c:69

◆ allocate_aligned()

virtual void* std::pallocator::allocate_aligned ( unsigned int  bytes,
unsigned int  alignment,
int  flags = 0 
)
inlinevirtual
48  {
49  return 0;
50  }

◆ allocator()

std::pallocator::allocator ( const char *  name = "palloc")
inlineexplicit
41 : m_name(name) {}

◆ deallocate()

virtual void std::pallocator::deallocate ( void *  ptr,
unsigned int  bytes 
)
inlinevirtual
51  {
52  return pfree(ptr);
53  }
void pfree(void *addr)
DeAlloceted the memory.
Definition: palloc.c:34

◆ get_name()

const char* std::pallocator::get_name ( ) const
inline
54 { return m_name; }

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: