--- parser3/src/targets/cgi/Attic/pa_pool.C 2001/05/16 17:10:34 1.10 +++ parser3/src/targets/cgi/Attic/pa_pool.C 2001/09/21 14:46:09 1.21 @@ -4,17 +4,18 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: pa_pool.C,v 1.10 2001/05/16 17:10:34 parser Exp $ */ +static const char *RCSId="$Id: pa_pool.C,v 1.21 2001/09/21 14:46:09 parser Exp $"; #include #include "pa_pool.h" +//#define DEBUG_POOL_MALLOC + +#ifdef DEBUG_POOL_MALLOC #include "pa_sapi.h" #include "pa_common.h" -#include #include "pa_value.h" #include "pa_array.h" @@ -60,14 +61,11 @@ #include "pa_vstateless_object.h" #include "pa_vstring.h" #include "pa_vtable.h" -#include "pa_vunknown.h" +#include "pa_vvoid.h" #include "pa_wcontext.h" #include "pa_wwrapper.h" -//#define DEBUG_POOL_MALLOC - -#ifdef DEBUG_POOL_MALLOC #define MALLOC_STAT_MAXSIZE (0x400*0x400) #define MALLOC_STAT_PLACES 10 @@ -128,7 +126,7 @@ ST(VStateless_class); ST(VStateless_object); ST(VString); ST(VTable); -ST(VUnknown); +ST(VVoid); ST(WContext); ST(WWrapper); @@ -161,13 +159,11 @@ ST(WWrapper); void *Pool::real_malloc(size_t size/*, int place*/) { #ifdef DEBUG_POOL_MALLOC int index=min(MALLOC_STAT_MAXSIZE-1, size); -/* if(size==88) { - _asm { - int 3; - }; - }*/ + int place=0; malloc_times[place][index]++; malloc_places[place]++; +/* if(size==9271) + __asm int 3;*/ #endif return ::malloc(size); } @@ -175,3 +171,8 @@ void *Pool::real_malloc(size_t size/*, i void *Pool::real_calloc(size_t size) { return ::calloc(size, 1); } + +bool Pool::real_register_cleanup(void (*cleanup) (void *), void *data) { + // we free nothing in CGI + return true; +} \ No newline at end of file