--- parser3/src/targets/apache13/modules/extra/Attic/pa_pool.C 2001/03/23 19:25:17 1.5 +++ parser3/src/targets/apache13/modules/extra/Attic/pa_pool.C 2001/09/26 10:32:26 1.11 @@ -1,13 +1,12 @@ -/* - Parser +/** @file + Parser: Apache module memory manager impl. + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_pool.C,v 1.5 2001/03/23 19:25:17 paf Exp $ + $Id: pa_pool.C,v 1.11 2001/09/26 10:32:26 parser Exp $ */ -//#include - #include "httpd.h" #include "pa_pool.h" @@ -19,3 +18,20 @@ void *Pool::real_malloc(size_t size) { void *Pool::real_calloc(size_t size) { return ap_pcalloc((pool*)fstorage, size); } + +bool Pool::real_register_cleanup(void (*cleanup) (void *), void *data) { + /* NB any code which invokes register_cleanup ... directly + * is a critical section which should be guarded by block_alarms() and + * unblock_alarms() ... + */ + + ap_block_alarms(); + + ap_register_cleanup((pool*)fstorage, data, + cleanup, + ap_null_cleanup); + + ap_unblock_alarms(); + + return true; +} \ No newline at end of file