Branch: Tag:

1998-01-26

1998-01-26 20:01:58 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

many minor memory leaks fixed

Rev: NT/.cvsignore:1.3
Rev: src/array.c:1.23
Rev: src/dmalloc.h:1.2
Rev: src/dynamic_buffer.c:1.7
Rev: src/dynamic_buffer.h:1.5
Rev: src/dynamic_load.c:1.23
Rev: src/error.h:1.10
Rev: src/interpret.c:1.62
Rev: src/interpret.h:1.17
Rev: src/language.yacc:1.55
Rev: src/las.c:1.45
Rev: src/las.h:1.12
Rev: src/lex.c:1.41
Rev: src/main.c:1.37
Rev: src/main.h:1.5
Rev: src/modules/Gmp/mpz_glue.c:1.25
Rev: src/modules/Image/font.c:1.27
Rev: src/object.c:1.34
Rev: src/object.h:1.14
Rev: src/operators.c:1.23
Rev: src/pike_memory.c:1.5
Rev: src/pike_types.c:1.30
Rev: src/pike_types.h:1.8
Rev: src/program.c:1.55
Rev: src/program.h:1.28
Rev: src/stralloc.c:1.25
Rev: src/stralloc.h:1.13
Rev: src/svalue.h:1.10
Rev: src/threads.c:1.54

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: main.c,v 1.36 1998/01/25 09:15:47 hubbe Exp $"); + RCSID("$Id: main.c,v 1.37 1998/01/26 19:59:56 hubbe Exp $");   #include "fdlib.h"   #include "backend.h"   #include "module.h"
69:    return add_to_callback(&exit_callbacks, call, arg, free_func);   }    - int main(int argc, char **argv) + int dbm_main(int argc, char **argv)   {    JMP_BUF back;    int e, num, do_backend;
304:    UNSETJMP(back);       do_exit(num); +  return num; /* avoid warning */   }    - void do_exit(int num) + #undef ATTRIBUTE + #define ATTRIBUTE(X) +  + void do_exit(int num) ATTRIBUTE((noreturn))   {    call_callback(&exit_callbacks, (void *)0);    free_callback(&exit_callbacks);
361: Inside #if defined(DEBUG) && defined(DEBUG_MALLOC)
   INT32 num,size,recount=0;       count_memory_in_arrays(&num, &size); -  if(num || size) +  if(num)    {    recount++;    fprintf(stderr,"Arrays left: %d (%d bytes) (zapped)\n",num,size);
370: Inside #if defined(DEBUG) && defined(DEBUG_MALLOC)
   zap_all_arrays();       count_memory_in_mappings(&num, &size); -  if(num || size) +  if(num)    {    recount++;    fprintf(stderr,"Mappings left: %d (%d bytes) (zapped)\n",num,size);
379: Inside #if defined(DEBUG) && defined(DEBUG_MALLOC)
   zap_all_mappings();       count_memory_in_multisets(&num, &size); -  if(num || size) +  if(num)    fprintf(stderr,"Multisets left: %d (%d bytes)\n",num,size);      
398: Inside #if defined(DEBUG) && defined(DEBUG_MALLOC)
         count_memory_in_programs(&num, &size); -  if(num || size) +  if(num)    fprintf(stderr,"Programs left: %d (%d bytes)\n",num,size);       {
411: Inside #if defined(DEBUG) && defined(DEBUG_MALLOC)
         count_memory_in_objects(&num, &size); -  if(num || size) +  if(num)    fprintf(stderr,"Objects left: %d (%d bytes)\n",num,size);    -  count_memory_in_strings(&num, &size); -  if(num || size) -  fprintf(stderr,"Strings left: %d (%d bytes) (zapped)\n",num,size); -  +     cleanup_shared_string_table();    }   #else