Branch: Tag:

2011-07-21

2011-07-21 15:30:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved DMALLOC tracing of strings in the wide and short string cases.

533:      #undef INIT_BLOCK   #define INIT_BLOCK(NEW_STR) do { \ -  (NEW_STR)->refs = 1; \ +  (NEW_STR)->refs = 0; \ +  add_ref((NEW_STR)); \    (NEW_STR)->flags = \    STRING_NOT_HASHED|STRING_NOT_SHARED|STRING_IS_SHORT; \    } while(0)
723:    sizeof(struct pike_string_hdr));    t->flags = STRING_NOT_HASHED|STRING_NOT_SHARED;    } -  t->refs = 1; +  t->refs = 0; +  add_ref(t); /* For DMALLOC */    t->len=len;    t->size_shift=shift;    DO_IF_DEBUG(t->next = NULL);