pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:44:    size_t alignment,    ptrdiff_t modulo_orig);      /* mapping(int:string) */   static struct mapping *reverse_symbol_table = NULL;      static struct block_allocator program_allocator = BA_INIT_PAGES(sizeof(struct program), 4);      ATTRIBUTE((malloc))   struct program * alloc_program(void) { -  return ba_alloc(&program_allocator); +  struct program *p = ba_alloc(&program_allocator); +  dmalloc_register(p, sizeof(struct program), DMALLOC_LOCATION()); +  return p;   }      void really_free_program(struct program * p) {    exit_program_struct(p); -  +  dmalloc_unregister(p, 0);    ba_free(&program_allocator, p);   }      void count_memory_in_programs(size_t *num, size_t *_size) {    size_t size;    struct program *p;    ba_count_all(&program_allocator, num, &size);    for(p=first_program;p;p=p->next) {    size+=p->total_size - sizeof (struct program);    }