--- parser3/src/main/pa_pool.C 2001/01/26 15:32:52 1.2 +++ parser3/src/main/pa_pool.C 2001/09/15 13:20:22 1.21 @@ -1,21 +1,23 @@ -/* - $Id: pa_pool.C,v 1.2 2001/01/26 15:32:52 paf Exp $ -*/ - -#include +/** @file + Parser: pool class. -#include "pa_pool.h" + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) -Pool::Pool() { -} + Author: Alexander Petrosyan (http://design.ru/paf) +*/ +static const char *RCSId="$Id: pa_pool.C,v 1.21 2001/09/15 13:20:22 parser Exp $"; -Pool::~Pool() { -} +#include "pa_pool.h" +#include "pa_exception.h" -void *Pool::alloc(size_t size) { - return ::malloc(size); +void Pool::fail_alloc(size_t size) const { + fexception->_throw(0, 0, + 0, + "failed to allocate %u bytes", size); } -void *Pool::calloc(size_t size) { - return ::calloc(size, 1); -} +void Pool::fail_register_cleanup() const { + fexception->_throw(0, 0, + 0, + "failed to register cleanup"); +} \ No newline at end of file