1998-04-17
1998-04-17 16:57:12 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
-
7abf49ce6691afcacc4fe5adf7ebb726ff772b39
(10 lines)
(+9/-1)
[
Show
| Annotate
]
Branch: 7.9
more debug added
Rev: src/stralloc.c:1.32
15:
#include <ctype.h>
- RCSID("$Id: stralloc.c,v 1.31 1998/04/17 05:13:32 hubbe Exp $");
+ RCSID("$Id: stralloc.c,v 1.32 1998/04/17 16:57:12 hubbe Exp $");
#define BEGIN_HASH_SIZE 997
#define MAX_AVG_LINK_LENGTH 3
193:
struct pike_string *debug_begin_shared_string(int len)
{
struct pike_string *t;
+ #ifdef DEBUG
+ if(d_flag>10)
+ verify_shared_strings_tables();
+ #endif
t=(struct pike_string *)xalloc(len + sizeof(struct pike_string));
t->str[len]=0;
t->len=len;
279: Inside #if defined(DEBUG)
if(s->next == (struct pike_string *)-1)
fatal("Freeing shared string again!\n");
+ if(((long)s->next) & 1)
+ fatal("Freeing shared string again, memory corrupt or other bug!\n");
+
unlink_pike_string(s);
s->next=(struct pike_string *)-1;
return;