-#if 0
-/*
-*
-* Fun: backtrace
-*
-* Desc: Initializes the memory leak detection module
-*
-*
-* Ret: RETVOID
-*
-* Notes: This function initializes the memory leak detection module.
-*
-*
-* File: cm_mem.c
-*
-*/
-#ifdef ANSI
-PUBLIC S32 backtrace
-(
-Void **buffer,
-S32 count
-)
-#else
-PUBLIC S32 backtrace(buffer, count)
-Void **buffer;
-S32 count;
-#endif
-{
- TRC3(backtrace);
-
- Backtrace_t bt;
- ucontext_t u;
-
- bt.bt_buffer = buffer;
- bt.bt_maxcount = count;
- bt.bt_actcount = 0;
-
- if (getcontext(&u) < 0)
- RETVALUE(0);
- (Void) walkcontext(&u, cmLeakCallBack, &bt);
- RETVALUE(bt.bt_actcount);
-
-} /* backtrace */
-#endif