Branch: Tag:

2008-10-12

2008-10-12 22:14:03 by Martin Stjernholm <mast@lysator.liu.se>

Added pike_cycle_depth constants to make Pike.count_memory avoid the most
central global structures.

Rev: server/base_server/configuration.pike:1.658
Rev: server/base_server/module.pike:1.232
Rev: server/base_server/roxen.pike:1.996
Rev: server/etc/modules/RXML.pmod/module.pmod:1.378
Rev: server/etc/modules/RXML.pmod/utils.pmod:1.35
Rev: server/etc/modules/Roxen.pmod:1.249

2:   //   // Created 1999-07-30 by Martin Stjernholm.   // - // $Id: module.pmod,v 1.377 2008/10/12 22:07:42 mast Exp $ + // $Id: module.pmod,v 1.378 2008/10/12 22:14:03 mast Exp $      // Kludge: Must use "RXML.refs" somewhere for the whole module to be   // loaded correctly.
131:   #define UNWIND_STATE mapping(string|object:mixed|array)   #define EVAL_ARGS_FUNC function(Context,Parser|PCode:mapping(string:mixed))|string    + // Tell Pike.count_memory this is global. + constant pike_cycle_depth = 0;    -  +    // Internal caches and object tracking   //   // This must be first so that it happens early in __INIT.
362:       // Internals:    +  // We assume these objects always are globally referenced. +  constant pike_cycle_depth = 0; +    #define MAKE_FRAME(_frame, _ctx, _parser, _args, _content) \    make_new_frame: do { \    if (UNWIND_STATE ustate = _ctx->unwind_state) \
1073:       // Internals:    +  // We assume these objects always are globally referenced. +  constant pike_cycle_depth = 0; +     void do_notify (function(:void) func)    {    notify_funcs |= ({func});
5595:       // Internals:    +  // We assume these objects always are globally referenced. +  constant pike_cycle_depth = 0; +     mixed _eval (Context ignored, PCode more_p_code)    // To be call compatible with PCode.    {
6387:       // Internals:    +  // We assume these objects always are globally referenced. +  constant pike_cycle_depth = 0; +     /*private*/ mapping(program:Type) _t_obj_cache;    // To avoid creating new type objects all the time in `().   
9464:   //! @[RXML.empty] instance, so this class should never be   //! instantiated. It's only available to allow inherits.   { +  // Tell Pike.count_memory this is global. +  constant pike_cycle_depth = 0; +     mixed `+ (mixed... vals) {return sizeof (vals) ? predef::`+ (@vals) : this_object();}    mixed ``+ (mixed... vals) {return sizeof (vals) ? predef::`+ (@vals) : this_object();}    string _sprintf (int flag) {return flag == 'O' && "RXML.empty";}