Reference

ACE_Obchunk(3)

Defines the state that represents a "chunk" of memory.

NAME

ACE_Obchunk - Defines the state that represents a "chunk" of memory.

SYNOPSIS

#include <ace/Obstack.h>
class ACE_Obchunk
{
  public:
    friend class ACE_Obstack;
    ACE_Obchunk (size_t size);
    ~ACE_Obchunk (void);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  private:
    char *end_;
    char *cur_;
    ACE_Obchunk *next_;
    char contents_[4];
};

PUBLIC MEMBERS

friend class ACE_Obstack;

ACE_Obchunk (size_t size);

Constructor.

~ACE_Obchunk (void);

dtor.

void dump (void) const;

Dump the state of an object.

ACE_ALLOC_HOOK_DECLARE;

Declare the dynamic allocation hooks.

PRIVATE MEMBERS

char *end_;

Pointer to the end of the chunk.

char *cur_;

Pointer to the current location in the chunk.

ACE_Obchunk *next_;

Next chunk in the chain.

char contents_[4];

Pointer to the beginning contents of this chunk. This field is actually overlayed by the memory allocated by ACE_Obstack::new_chunk. Therefore, it *must* come last.

AUTHOR

Doug Schmidt

LIBRARY

ace