--- parser3/src/targets/isapi/Attic/pa_pool.C 2001/03/22 15:30:49 1.1 +++ parser3/src/targets/isapi/Attic/pa_pool.C 2003/01/31 12:34:41 1.16.2.1 @@ -1,25 +1,27 @@ -/* - Parser - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) +/** @file + Parser: ISAPI memory manager impl. - $Id: pa_pool.C,v 1.1 2001/03/22 15:30:49 paf Exp $ + Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ -#include +static const char* IDENT_POOL_C="$Date: 2003/01/31 12:34:41 $"; + +//#include #include "pa_pool.h" +#include "pool_storage.h" -void *Pool::real_malloc(size_t size) { - // todo: log - return ::malloc(size); +void *Pool::real_malloc(size_t size, int place) { + return fstorage? + static_cast(fstorage)->malloc(size): 0; } void *Pool::real_calloc(size_t size) { - // todo: log - return ::calloc(size, 1); + return fstorage? + static_cast(fstorage)->calloc(size): 0; } -Pool::~Pool() { - // todo: free -} \ No newline at end of file +bool Pool::real_register_cleanup(void (*cleanup) (void *), void *data) { + return fstorage!=0 && static_cast(fstorage)->register_cleanup(cleanup, data); +}