CUBRID Engine  latest
HL::ObstackHeap< ChunkSize, SuperHeap > Class Template Reference

#include <obstackheap.h>

Inheritance diagram for HL::ObstackHeap< ChunkSize, SuperHeap >:
Inheritance graph
Collaboration diagram for HL::ObstackHeap< ChunkSize, SuperHeap >:
Collaboration graph

Classes

class  ChunkHeader
 

Public Types

enum  { Alignment = sizeof(double) }
 

Public Member Functions

 ObstackHeap ()
 
 ~ObstackHeap ()
 
void reset (const int chkSize)
 
void * grow (size_t sz)
 
void * malloc (size_t sz)
 
void free (void *ptr)
 
void * getObjectBase ()
 
void finalize ()
 

Private Member Functions

int objectSize ()
 
int isValid ()
 
ChunkHeadermakeChunk (ChunkHeader *ch, size_t sz)
 
ChunkHeadercopyToNew (size_t sz)
 

Private Attributes

int m_chkSize
 
char * currentBase
 
char * nextPos
 
ChunkHeadercurrentChunk
 

Detailed Description

template<int ChunkSize, class SuperHeap>
class HL::ObstackHeap< ChunkSize, SuperHeap >

Definition at line 31 of file obstackheap.h.

Member Enumeration Documentation

template<int ChunkSize, class SuperHeap>
anonymous enum
Enumerator
Alignment 

Definition at line 38 of file obstackheap.h.

Constructor & Destructor Documentation

template<int ChunkSize, class SuperHeap>
HL::ObstackHeap< ChunkSize, SuperHeap >::ObstackHeap ( )
inline

Definition at line 40 of file obstackheap.h.

template<int ChunkSize, class SuperHeap>
HL::ObstackHeap< ChunkSize, SuperHeap >::~ObstackHeap ( )
inline

Definition at line 54 of file obstackheap.h.

Member Function Documentation

template<int ChunkSize, class SuperHeap>
ChunkHeader* HL::ObstackHeap< ChunkSize, SuperHeap >::copyToNew ( size_t  sz)
inlineprivate

Definition at line 250 of file obstackheap.h.

Referenced by HL::ObstackHeap< 0, MallocHeap >::grow().

Here is the caller graph for this function:

template<int ChunkSize, class SuperHeap>
void HL::ObstackHeap< ChunkSize, SuperHeap >::finalize ( )
inline

Definition at line 171 of file obstackheap.h.

Referenced by HL::ObstackHeap< 0, MallocHeap >::malloc().

Here is the caller graph for this function:

template<int ChunkSize, class SuperHeap>
void HL::ObstackHeap< ChunkSize, SuperHeap >::free ( void *  ptr)
inline

Definition at line 136 of file obstackheap.h.

template<int ChunkSize, class SuperHeap>
void* HL::ObstackHeap< ChunkSize, SuperHeap >::getObjectBase ( )
inline

Definition at line 165 of file obstackheap.h.

template<int ChunkSize, class SuperHeap>
void* HL::ObstackHeap< ChunkSize, SuperHeap >::grow ( size_t  sz)
inline

Definition at line 80 of file obstackheap.h.

template<int ChunkSize, class SuperHeap>
ChunkHeader* HL::ObstackHeap< ChunkSize, SuperHeap >::makeChunk ( ChunkHeader ch,
size_t  sz 
)
inlineprivate
template<int ChunkSize, class SuperHeap>
void* HL::ObstackHeap< ChunkSize, SuperHeap >::malloc ( size_t  sz)
inline

Definition at line 106 of file obstackheap.h.

template<int ChunkSize, class SuperHeap>
int HL::ObstackHeap< ChunkSize, SuperHeap >::objectSize ( )
inlineprivate

Definition at line 182 of file obstackheap.h.

Referenced by HL::ObstackHeap< 0, MallocHeap >::copyToNew(), and HL::ObstackHeap< 0, MallocHeap >::isValid().

Here is the caller graph for this function:

template<int ChunkSize, class SuperHeap>
void HL::ObstackHeap< ChunkSize, SuperHeap >::reset ( const int  chkSize)
inline

Definition at line 66 of file obstackheap.h.

Referenced by hl_register_ostk_heap().

Here is the caller graph for this function:

Member Data Documentation

template<int ChunkSize, class SuperHeap>
int HL::ObstackHeap< ChunkSize, SuperHeap >::m_chkSize
private

Definition at line 34 of file obstackheap.h.


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