Simple Application Framework  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Functions
Saf::Mem Namespace Reference

Low level memory handling functions. More...

Classes

class  SharedPtr
 Shared pointer class with reference counting. More...

Functions

void * AllocateSafMemory (Size n, const Saf::SourceLocation &loc)
 Generic type-free malloc() encapsulation.
template<class T >
void Delete (T *&p)
 Generic delete encapsulation.
template<class T >
void Delete (T *&p, Size n)
 Generic delete [] encapsulation.
template<class T >
void OperatorDelete (T *&p)
 Operator delete.
template<class T >
void OperatorDelete (T *&p, Size n)
 Operator delete for arrays.
template<class T >
void OperatorNew (T *&p, const Saf::SourceLocation &loc)
 Operator new.
template<class T >
void OperatorNew (T *&p, Size n, const Saf::SourceLocation &loc)
 Operator new for arrays.

Detailed Description

Low level memory handling functions.

Warning:
Internal. Should never be used in application code!

Function Documentation

void * Saf::Mem::AllocateSafMemory ( Size  n,
const Saf::SourceLocation loc 
)

Generic type-free malloc() encapsulation.

        Basic memory allocation routine, this function is called by all the remaining
        memory allocation functions (including operator new). Do not use directly.
Todo:
User handler and allocator?
Warning:
Do not use directly.
template<class T >
void Saf::Mem::Delete ( T *&  p)

Generic delete encapsulation.

template<class T >
void Saf::Mem::Delete ( T *&  p,
Size  n 
)

Generic delete [] encapsulation.

template<class T >
void Saf::Mem::OperatorDelete ( T *&  p)

Operator delete.

template<class T >
void Saf::Mem::OperatorDelete ( T *&  p,
Size  n 
)

Operator delete for arrays.

template<class T >
void Saf::Mem::OperatorNew ( T *&  p,
const Saf::SourceLocation loc 
)

Operator new.

template<class T >
void Saf::Mem::OperatorNew ( T *&  p,
Size  n,
const Saf::SourceLocation loc 
)

Operator new for arrays.