--- parser3/src/main/pa_pool.C 2001/11/12 14:45:37 1.40 +++ parser3/src/main/pa_pool.C 2001/11/16 13:17:29 1.45 @@ -4,19 +4,21 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://paf.design.ru) - $Id: pa_pool.C,v 1.40 2001/11/12 14:45:37 paf Exp $ + $Id: pa_pool.C,v 1.45 2001/11/16 13:17:29 paf Exp $ */ #include "pa_pool.h" #include "pa_exception.h" #include "pa_common.h" +#include "pa_sapi.h" #ifdef XML #include #endif Pool::Pool(void *astorage) : - fstorage(astorage), fcontext(0), ftag(0) + fstorage(astorage), fcontext(0), + ftotal_allocated(0), ftotal_times(0) #ifdef XML , transcoder(0) #endif @@ -35,15 +37,14 @@ Pool::~Pool() { } void Pool::fail_alloc(size_t size) const { - throw Exception(0, 0, - 0, - "failed to allocate %u bytes", size); + SAPI::die("out of pool memory: failed to allocate %u bytes; " + "already allocated on pool: %u bytes in %u times", + size, + ftotal_allocated, ftotal_times); } void Pool::fail_register_cleanup() const { - throw Exception(0, 0, - 0, - "failed to register cleanup"); + SAPI::die("failed to register cleanup"); } void Pool::set_charset(const String &new_charset) {