NAME

OTC_Heap - Memory allocator.

SYNOPSIS


#include <OTC/memory/heap.hh>

class OTC_Heap
{
  public:
    static os_typespec* get_os_typespec();
    OTC_Heap(char* theMemory, size_t theSize);
    void* allocate(size_t theSize);
    void release(void* theMemory);
    static size_t minimum();
    void dump(ostream& outs) const;
};

CLASS TYPE

Concrete

DESCRIPTION

OTC_Heap provides heap style memory management, for a chunk of memory. The class uses the boundary tag method of allocation. The implementation is based on ideas from the book C++, A Guide for C Programmers by Sharam Hekmatpour.

CONSTRUCTION

OTC_Heap(char* theMemory, size_t theSize);

ALLOCATION/DEALLOCATION

void* allocate(size_t theSize);
void release(void* theMemory);

QUERY

static size_t minimum();

DEBUG

void dump(ostream& outs) const;

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1993 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED