|
|
| version 1.2, 2003/07/24 11:31:20 | version 1.13, 2017/12/03 23:56:05 |
|---|---|
| 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-2017 Art. Lebedev Studio (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$"; | |
| #include "pa_common.h" | #include "pa_common.h" |
| #include "pa_vmemory.h" | #include "pa_vmemory.h" |
| #include "pa_request.h" | #include "pa_request.h" |
| volatile const char * IDENT_MEMORY_C="$Id$" IDENT_PA_VMEMORY_H; | |
| class MMemory: public Methoded { | class MMemory: public Methoded { |
| public: | public: |
| MMemory(); | MMemory(); |
| Line 21 public: // Methoded | Line 21 public: // Methoded |
| // global variables | // global variables |
| DECLARE_CLASS_VAR(memory, 0 /*fictive*/, new MMemory); | DECLARE_CLASS_VAR(memory, new MMemory); |
| static void _compact(Request& r, MethodParams& params) { | #ifdef GC_DEBUG |
| extern "C" void GC_generate_random_backtrace(); | |
| #endif | |
| static void _compact(Request& r, MethodParams&) { | |
| r.wipe_unused_execution_stack(); | r.wipe_unused_execution_stack(); |
| #ifndef PA_DEBUG_DISABLE_GC | #ifndef PA_DEBUG_DISABLE_GC |
| GC_gcollect(); | { |
| int saved=GC_dont_gc; | |
| GC_dont_gc=0; | |
| GC_gcollect(); | |
| #ifdef GC_DEBUG | |
| GC_generate_random_backtrace(); | |
| #endif | |
| GC_dont_gc=saved; | |
| } | |
| #endif | #endif |
| } | } |