--- parser3/src/main/pa_pool.C 2001/01/26 14:47:52 1.1 +++ parser3/src/main/pa_pool.C 2001/03/11 08:16:35 1.11 @@ -1,17 +1,19 @@ -#include +/* + Parser + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://design.ru/paf) -#include "pa_pool.h" - -Pool::Pool() { -} + $Id: pa_pool.C,v 1.11 2001/03/11 08:16:35 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); +void Pool::fail(size_t size) const { + // TODO: if(!fexception) die("Pool::fail with no exception set") + fexception->_throw(0, 0, + 0, + "failed to allocate %u bytes", size); }