Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::DefaultAllocator Class Reference

#include <elm/alloc/DefaultAllocator.h>

Public Member Functions

void * allocate (t::size size) throw (BadAlloc)
 
void free (void *block)
 

Static Public Attributes

static DefaultAllocator DEFAULT
 

Detailed Description

Default implementation of a memory allocator just calling new and delete.

Member Function Documentation

void * elm::DefaultAllocator::allocate ( t::size  size)
throw (BadAlloc
)

Allocate a memory block of the given size.

Parameters
sizeSize of the block to allocate.
Returns
Allocated block.
Exceptions
BadAllocThrown if there is no more system memory.
void elm::DefaultAllocator::free ( void *  block)

Free the given block.

Parameters
blockBlock to free.

Member Data Documentation

DefaultAllocator elm::DefaultAllocator::DEFAULT
static

Default allocator.


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