Branch: Tag:

2003-03-14

2003-03-14 15:57:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved dmalloc.

Rev: src/apply_low.h:1.16
Rev: src/array.c:1.138
Rev: src/backend.cmod:1.38
Rev: src/bignum.c:1.34
Rev: src/block_alloc.h:1.63
Rev: src/builtin_functions.c:1.479
Rev: src/code/ia32.c:1.25
Rev: src/cpp.c:1.115
Rev: src/encode.c:1.169
Rev: src/error.c:1.102
Rev: src/gc.c:1.209
Rev: src/interpret.c:1.295
Rev: src/interpret.h:1.131
Rev: src/interpret_functions.h:1.141
Rev: src/iterators.cmod:1.35
Rev: src/las.c:1.330
Rev: src/mapping.c:1.163
Rev: src/modules/Image/orient.c:1.24
Rev: src/modules/Image/phase.h:1.6
Rev: src/modules/Java/jvm.c:1.60
Rev: src/modules/SANE/sane.c:1.17
Rev: src/modules/_Roxen/roxen.c:1.33
Rev: src/multiset.c:1.69
Rev: src/object.c:1.228
Rev: src/opcodes.c:1.143
Rev: src/operators.c:1.172
Rev: src/pike_types.c:1.211
Rev: src/post_modules/Shuffler/Shuffler.cmod:1.23
Rev: src/post_modules/Shuffler/a_source_pikestring.c:1.8
Rev: src/post_modules/Shuffler/a_source_system_memory.c:1.9
Rev: src/post_modules/Shuffler/b_source_normal_file.c:1.8
Rev: src/post_modules/Shuffler/c_source_stream.c:1.7
Rev: src/post_modules/Shuffler/d_source_pikestream.c:1.6
Rev: src/post_modules/Shuffler/e_source_block_pikestream.c:1.2
Rev: src/preprocessor.h:1.58
Rev: src/program.c:1.486
Rev: src/signal_handler.c:1.249
Rev: src/stralloc.c:1.153
Rev: src/stralloc.h:1.73
Rev: src/svalue.c:1.161
Rev: src/threads.c:1.211

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: las.c,v 1.329 2003/03/09 13:10:40 grubba Exp $ + || $Id: las.c,v 1.330 2003/03/14 15:50:44 grubba Exp $   */      #include "global.h" - RCSID("$Id: las.c,v 1.329 2003/03/09 13:10:40 grubba Exp $"); + RCSID("$Id: las.c,v 1.330 2003/03/14 15:50:44 grubba Exp $");      #include "language.h"   #include "interpret.h"
537: Inside #if defined(SHARED_NODES)
   orig->current_file = NULL;    }    free_node(dmalloc_touch(node *, orig)); -  n->refs++; +  add_ref(n);    return check_node_hash(dmalloc_touch(node *, n));    }    n = n->next;
661:    if(!n) return;      #ifdef SHARED_NODES -  if (--n->refs) { +  if (sub_ref(n)) {   #ifdef PIKE_DEBUG    if(l_flag>9)    print_tree(n);
730:    /* Free CAR */      #ifdef SHARED_NODES -  if (--_CAR(n)->refs) { +  if (sub_ref(_CAR(n))) {    _CAR(n) = NULL;    } else {   #endif /* SHARED_NODES */
746:    /* Free CDR */      #ifdef SHARED_NODES -  if (--_CDR(n)->refs) { +  if (sub_ref(_CDR(n))) {    _CDR(n) = NULL;    } else {   #endif /* SHARED_NODES */
795:    really_free_node_s(dead);      #ifdef SHARED_NODES -  if (--_CDR(n)->refs) { +  if (sub_ref(_CDR(n))) {    _CDR(n) = NULL;    goto backtrack;    } else {
852: Inside #if defined(SHARED_NODES) || defined(__CHECKER__) and #if defined(SHARED_NODES)
   MEMSET(res, 0, sizeof(node));   #ifdef SHARED_NODES    res->hash = 0; -  res->refs = 1; +  res->refs = 0; +  add_ref(res); /* For DMALLOC... */   #endif /* SHARED_NODES */   #endif /* SHARED_NODES || __CHECKER__ */   
1211:    res->u.sval.u.integer = nr;    res->type=get_type_of_svalue( & res->u.sval);   #ifdef SHARED_NODES -  res->refs = 1; +  res->refs = 0; +  add_ref(res); /* For DMALLOC... */    /* res->hash = hash_node(res); */   #endif /* SHARED_NODES */   
1933:       if (thrown.type != PIKE_T_UNKNOWN) {    *(Pike_sp++) = thrown; +  dmalloc_touch_svalue(Pike_sp-1);    thrown.type = PIKE_T_INT;    low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1);    if (SAFE_IS_ZERO(Pike_sp-1)) yy_describe_exception(&thrown);
2173:       default:   #ifdef SHARED_NODES -  n->refs++; +  add_ref(n);    return n;   #else /* !SHARED_NODES */