--- parser3/src/main/pa_pool.C 2001/01/26 15:32:52 1.2 +++ parser3/src/main/pa_pool.C 2001/03/19 17:42:16 1.14 @@ -1,21 +1,21 @@ -/* - $Id: pa_pool.C,v 1.2 2001/01/26 15:32:52 paf Exp $ -*/ +/** @file + Parser: pool class. -#include + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) -#include "pa_pool.h" + Author: Alexander Petrosyan (http://design.ru/paf) -Pool::Pool() { -} + $Id: pa_pool.C,v 1.14 2001/03/19 17:42:16 paf Exp $ +*/ -Pool::~Pool() { -} +#include -void *Pool::alloc(size_t size) { - return ::malloc(size); -} +#include "pa_pool.h" +#include "pa_exception.h" -void *Pool::calloc(size_t size) { - return ::calloc(size, 1); +/// \todo if(!fexception) die("Pool::fail with no exception set") +void Pool::fail(size_t size) const { + fexception->_throw(0, 0, + 0, + "failed to allocate %u bytes", size); }