Branch: Tag:

1999-05-02

1999-05-02 08:13:05 by Fredrik H├╝binette (Hubbe) <hubbe@hubbe.net>

more debug and fixed a memory leak in interpret.c

Rev: src/backend.c:1.41
Rev: src/backend.h:1.7
Rev: src/block_alloc.h:1.11
Rev: src/block_alloc_h.h:1.4
Rev: src/builtin_functions.c:1.168
Rev: src/callback.c:1.17
Rev: src/callback.h:1.8
Rev: src/configure.in:1.281
Rev: src/constants.c:1.18
Rev: src/dmalloc.h:1.11
Rev: src/error.c:1.35
Rev: src/error.h:1.36
Rev: src/gc.c:1.42
Rev: src/gc.h:1.22
Rev: src/interpret.c:1.122
Rev: src/interpret.h:1.31
Rev: src/interpreter.h:1.5
Rev: src/modules/call_out/call_out.c:1.27
Rev: src/modules/files/file.c:1.152
Rev: src/modules/system/system.c:1.70
Rev: src/pike_memory.c:1.37
Rev: src/program.c:1.123
Rev: src/signal_handler.c:1.129
Rev: src/stralloc.c:1.59
Rev: src/threads.c:1.93

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.122 1999/05/01 16:33:11 grubba Exp $"); + RCSID("$Id: program.c,v 1.123 1999/05/02 08:11:47 hubbe Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
418:   #define FOO(NUMTYPE,TYPE,NAME) \    size=DO_ALIGN(size, ALIGNOF(TYPE)); \    MEMCPY(data+size,p->NAME,p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0])); \ -  free((char *)p->NAME); \ +  dmfree((char *)p->NAME); \    p->NAME=(TYPE *)(data+size); \    size+=p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0]);   #include "program_areas.h"
682:    if(p->flags & PROGRAM_OPTIMIZED)    {    if(p->program) -  free(p->program); +  dmfree(p->program);   #define FOO(NUMTYPE,TYPE,NAME) p->NAME=0;   #include "program_areas.h"    }else{   #define FOO(NUMTYPE,TYPE,NAME) \ -  if(p->NAME) { free((char *)p->NAME); p->NAME=0; } +  if(p->NAME) { dmfree((char *)p->NAME); p->NAME=0; }   #include "program_areas.h"    }       FREE_PROT(p); -  free((char *)p); +  dmfree((char *)p);       GC_FREE();   }
746:       if(malloc_size_program)    { -  free((char *)malloc_size_program); +  dmfree((char *)malloc_size_program);    malloc_size_program=0;    }   
2801:    free_string(f->current_return_type);       compiler_frame=f->previous; -  free((char *)f); +  dmfree((char *)f);   }