|
|
| version 1.1.2.1, 2003/03/25 11:43:34 | version 1.7, 2004/06/22 14:12:57 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: @b memory parser class. | Parser: @b memory parser class. |
| Copyright(c) 2001-2003 ArtLebedev Group(http://www.artlebedev.com) | Copyright(c) 2001-2004 ArtLebedev Group(http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru>(http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru>(http://paf.design.ru) |
| */ | */ |
| static const char* IDENT_MATH_C="$Date$"; | static const char * const IDENT_MATH_C="$Date$"; |
| #include "pa_common.h" | #include "pa_common.h" |
| #include "pa_vmemory.h" | #include "pa_vmemory.h" |
| #include "pa_request.h" | |
| class MMemory: public Methoded { | class MMemory: public Methoded { |
| public: | public: |
| Line 22 public: // Methoded | Line 23 public: // Methoded |
| DECLARE_CLASS_VAR(memory, 0 /*fictive*/, new MMemory); | DECLARE_CLASS_VAR(memory, 0 /*fictive*/, new MMemory); |
| static void _compact(Request& r, MethodParams* params) { | #undef GC_DEBUG |
| GC_gcollect(); | #ifdef GC_DEBUG |
| } | extern "C" GC_API void GC_print_backtrace(void *); |
| void *debug_print_backtrace=0; | |
| #endif | |
| static void _compact(Request& r, MethodParams&) { | |
| r.wipe_unused_execution_stack(); | |
| #ifndef PA_DEBUG_DISABLE_GC | |
| { | |
| int saved=GC_dont_gc; | |
| GC_dont_gc=0; | |
| GC_gcollect(); | |
| GC_dont_gc=saved; | |
| } | |
| #ifdef GC_DEBUG | |
| if(debug_print_backtrace) | |
| GC_print_backtrace(debug_print_backtrace); | |
| #endif | |
| #endif | |
| } | |
| // constructor | // constructor |