In file localheap.hpp:

class LocalHeap

Optimized memory handler.

Documentation

Optimized memory handler. One block of data is organized as stack memory. One can allocate memory out of it. This increases the stack pointer. With CleanUp, the pointer is reset to the beginning or to a specific position.

Public Methods

[more] LocalHeap(unsigned int asize)
Allocate one block of size asize
[more] LocalHeap(char* adata, unsigned int asize) throw()
Use provided memory for the LocalHeap
[more] ~LocalHeap()
free memory
[more]void CleanUp() throw()
delete all memory on local heap
[more]void* GetPointer() throw()
returns heap-pointer
[more]void CleanUp(void* addr) throw()
deletes memory back to heap-pointer
[more]void* Alloc(unsigned int size) throw(LocalHeapOverflow)
allocates size bytes of memory from local heap
[more]template<typename T> T* Alloc(unsigned int size) throw(LocalHeapOverflow)
allocates size objects of type T on local heap
[more]void ThrowException() throw(LocalHeapOverflow)
[more]void Free(void* data) throw()
free memory (dummy function)
[more]int Available() const throw()
available memory on LocalHeap

o LocalHeap(unsigned int asize)
Allocate one block of size asize

o LocalHeap(char* adata, unsigned int asize) throw()
Use provided memory for the LocalHeap

o ~LocalHeap()
free memory

ovoid CleanUp() throw()
delete all memory on local heap

ovoid* GetPointer() throw()
returns heap-pointer

ovoid CleanUp(void* addr) throw()
deletes memory back to heap-pointer

ovoid* Alloc(unsigned int size) throw(LocalHeapOverflow)
allocates size bytes of memory from local heap

otemplate<typename T> T* Alloc(unsigned int size) throw(LocalHeapOverflow)
allocates size objects of type T on local heap

ovoid ThrowException() throw(LocalHeapOverflow)

ovoid Free(void* data) throw()
free memory (dummy function)

oint Available() const throw()
available memory on LocalHeap


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.