pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || 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"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin_functions.c:5012: Inside #if defined(PIKE_DEBUG)
   INT_TYPE l;       ASSERT_SECURITY_ROOT("_assembler_debug");       get_all_args("_assembler_debug", args, "%i", &l);    pop_n_elems(args);    push_int(a_flag);    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.    *!    *! @param p    *! Program to dump.    *!    *! @param indent    *! Number of spaces to indent the output.    *!    *! @note
pike.git/src/builtin_functions.c:7902: Inside #if defined(DEBUG_MALLOC)
   *! @belongs Debug    *!    *! @note    *! Only available when compiled with dmalloc.    */   PMOD_EXPORT void f__list_open_fds(INT32 args)   {    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   /*! @decl void locate_references(string|array|mapping| @    *! multiset|function|object| @    *! program|type o)    *! @belongs Debug    *!    *! This function is mostly intended for debugging. It will search through    *! all data structures in Pike looking for @[o] and print the
pike.git/src/builtin_functions.c:9644: Inside #if defined(DEBUG_MALLOC)
     #ifdef DEBUG_MALLOC      /* function(void:void) */    ADD_EFUN("_reset_dmalloc",f__reset_dmalloc,    tFunc(tVoid,tVoid),OPT_SIDE_EFFECT);    ADD_EFUN("_dmalloc_set_name",f__dmalloc_set_name,    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      /* function(1=mixed:1) */    ADD_EFUN("_locate_references",f__locate_references,    tFunc(tSetvar(1,tMix),tVar(1)),OPT_SIDE_EFFECT);    ADD_EFUN("_describe",f__describe,    tFunc(tSetvar(1,tMix),tVar(1)),OPT_SIDE_EFFECT);    ADD_EFUN("_gc_set_watch", f__gc_set_watch,    tFunc(tComplex,tVoid), OPT_SIDE_EFFECT);