Annotation of parser3/src/main/pa_memory.C, revision 1.1.2.5
1.1.2.1 paf 1: /** @file
2: Parser: memory reference counting classes.
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:
1.1.2.5 ! paf 8: static const char* IDENT_MEMORY_C="$Date: 2003/03/06 12:02:05 $";
1.1.2.1 paf 9:
10: #include "pa_pool.h"
11: #include "pa_exception.h"
12: #include "pa_common.h"
13: #include "pa_sapi.h"
1.1.2.5 ! paf 14:
! 15: #ifdef PA_DEBUG_REFERENCES
! 16: //#include "../lib/stacktrace/stacktrace.h"
! 17: #include "../lib/stackdumper/include/stackdumper.h"
! 18:
! 19: const void *refdbg_this=(const void *)0x0132bd20/*$object[<<<^engine::parser[]], Junction::this of method @process_4_main with leak = 0x01356bb0*/; //0x013055a0; //0;
! 20: StackDumper sd(true);
! 21:
! 22: void pa_stack_dump(const char *msg) {
! 23: // Run a stack trace, skip the assert call (passing 1)
! 24: // char *stackMsg = stackTraceAndGetString();
! 25: // printf("%s\n", stackMsg);
! 26: sd.DumpStack();
! 27: sd.puts(msg);
! 28: }
! 29: #endif
1.1.2.1 paf 30:
1.1.2.2 paf 31: void *pa_fail_alloc(char *what, size_t size) {
1.1.2.3 paf 32: SAPI::abort("out of memory: failed to %s %u bytes",
1.1.2.1 paf 33: what, size);
34:
35: // never reached
36: return 0;
37: }
E-mail: