pike.git / src / block_alloc.h

version» Context lines:

pike.git/src/block_alloc.h:243:    \   DO_IF_DMALLOC( \   static void PIKE_CONCAT3(dmalloc_,DATA,_not_freed) (struct DATA *d, \    const char *msg) \   { \    /* Separate function to allow gdb breakpoints. */ \    fprintf (stderr, "struct " TOSTR(DATA) \    " at %p is still in use %s\n", d, msg); \   } \    \ + PMOD_EXPORT void PIKE_CONCAT(show_pages_,DATA)() {\ +  struct PIKE_CONCAT(DATA,_block) *p = PIKE_CONCAT(DATA,_blocks); \ +  int c = 0;\ +  fprintf(stderr, "blocks of "#DATA"\n");\ +  while (p) {\ +  double filled = (double)p->used/BSIZE * 100;\ +  fprintf(stderr, "%d\t%f\n", c++, filled);\ +  p = p->next;\ +  } \ + } \ +  \   static void PIKE_CONCAT(dmalloc_late_free_,DATA) (struct DATA *d) \   { \    /* Separate function to allow gdb breakpoints. */ \    fprintf (stderr, "struct " TOSTR(DATA) " at %p freed now (too late)\n", d); \    dmalloc_mark_as_free (d, 1); \    dmalloc_unregister (d, 1); \    PIKE_MEM_NA (*d); \   } \    \   static void PIKE_CONCAT3(dmalloc_free_,DATA,_block) ( \