2010-07-19
2010-07-19 15:30:48 by Martin Stjernholm <mast@lysator.liu.se>
-
2f4c68c1cf1dc1d9818e79c0a6dc48ff9b768922
(24 lines)
(+22/-2)
[
Show
| Annotate
]
Branch: 7.9
Added pike wrapper for debug_malloc_dump_references.
Rev: lib/modules/Debug.pmod/module.pmod:1.6
Rev: src/builtin_functions.c:1.702
2:
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
- || $Id: builtin_functions.c,v 1.701 2010/05/31 13:59:04 grubba Exp $
+ || $Id: builtin_functions.c,v 1.702 2010/07/19 15:30:48 mast Exp $
*/
#include "global.h"
5019: Inside #if defined(PIKE_DEBUG)
a_flag = l;
}
- /*! @decl void _dump_program_tables(program p, int|void indent)
+ /*! @decl void dump_program_tables(program p, int|void indent)
+ *! @belongs Debug
*!
*! Dumps the internal tables for the program @[p] on stderr.
*!
7909: Inside #if defined(DEBUG_MALLOC)
extern void list_open_fds(void);
list_open_fds();
}
+
+ /*! @decl void dump_dmalloc_locations(string|array|mapping| @
+ *! multiset|function|object| @
+ *! program|type o)
+ *! @belongs Debug
+ *!
+ *! @note
+ *! Only available when compiled with dmalloc.
+ */
+ PMOD_EXPORT void f__dump_dmalloc_locations(INT32 args)
+ {
+ ASSERT_SECURITY_ROOT("_dump_dmalloc_locations");
+ if(args)
+ debug_malloc_dump_references (Pike_sp[-args].u.refs, 2, 1, 0);
+ pop_n_elems(args-1);
+ }
#endif
#ifdef PIKE_DEBUG
9651: Inside #if defined(DEBUG_MALLOC)
tOr(tFunc(tStr tInt,tVoid), tFunc(tVoid,tVoid)),OPT_SIDE_EFFECT);
ADD_EFUN("_list_open_fds",f__list_open_fds,
tFunc(tVoid,tVoid),OPT_SIDE_EFFECT);
+ ADD_EFUN("_dump_dmalloc_locations",f__dump_dmalloc_locations,
+ tFunc(tSetvar(1,tMix),tVar(1)),OPT_SIDE_EFFECT);
#endif
#ifdef PIKE_DEBUG