Annotation of parser3/src/classes/memory.C, revision 1.2
1.2 ! paf 1: /** @file
! 2: Parser: @b memory parser class.
! 3:
! 4: Copyright(c) 2001-2003 ArtLebedev Group(http://www.artlebedev.com)
! 5: Author: Alexandr Petrosian <paf@design.ru>(http://paf.design.ru)
! 6: */
! 7:
! 8: static const char* IDENT_MATH_C="$Date: 2003/04/03 10:48:24 $";
! 9:
! 10: #include "pa_common.h"
! 11: #include "pa_vmemory.h"
! 12: #include "pa_request.h"
! 13:
! 14: class MMemory: public Methoded {
! 15: public:
! 16: MMemory();
! 17:
! 18: public: // Methoded
! 19: bool used_directly() { return false; }
! 20: };
! 21:
! 22: // global variables
! 23:
! 24: DECLARE_CLASS_VAR(memory, 0 /*fictive*/, new MMemory);
! 25:
! 26: static void _compact(Request& r, MethodParams& params) {
! 27: r.wipe_unused_execution_stack();
! 28: #ifndef PA_DEBUG_DISABLE_GC
! 29: GC_gcollect();
! 30: #endif
! 31: }
! 32:
! 33: // constructor
! 34:
! 35: MMemory::MMemory(): Methoded("memory") {
! 36: // ^compact[]
! 37: add_native_method("compact", Method::CT_STATIC, _compact, 0, 0);
! 38: }
E-mail: