NAME

ACE_Obstack - Define a simple "mark and release" memory allocation utility.

SYNOPSIS

#include <ace/Obstack.h>

class ACE_Obstack { public: ACE_Obstack ( size_t size = 4096 - sizeof (ACE_Obchunk), ACE_Allocator *allocator_strategy = 0 ); ~ACE_Obstack (void); char *copy (const char *data, size_t len); void release (void); void dump (void) const; ACE_ALLOC_HOOK_DECLARE; protected: ACE_Allocator *allocator_strategy_; size_t size_; };

DESCRIPTION

The implementation is similar to the GNU obstack utility, which is used extensively in the GCC compiler.

Initialization and termination methods.

ACE_Obstack (
    size_t size = 4096 - sizeof (ACE_Obchunk),
    ACE_Allocator *allocator_strategy = 0
    );

~ACE_Obstack (void);

char *copy (const char *data, size_t len);

void release (void);

void dump (void) const;

ACE_ALLOC_HOOK_DECLARE;

Don't change the order of the following two fields.

Head of the Obchunk chain. Pointer to the current Obchunk.

AUTHOR

Doug Schmidt

LIBRARY

ace