pike.git / src / dmalloc.h

version» Context lines:

pike.git/src/dmalloc.h:140:   #define debug_malloc_touch_bt(X) debug_malloc_update_location_bt ((void *)(X), __FILE__, __LINE__, NULL)   #define debug_malloc_touch_named_bt(X,NAME) debug_malloc_update_location_bt ((void *)(X), __FILE__, __LINE__, (NAME))      #define xalloc(X) ((void *)debug_malloc_update_location((void *)debug_xalloc(X), DMALLOC_NAMED_LOCATION(" xalloc")))   #define xcalloc(N, S) ((void *)debug_malloc_update_location((void *)debug_xcalloc(N, S), DMALLOC_NAMED_LOCATION(" xcalloc")))   #define xfree(X) debug_xfree(debug_malloc_update_location((X), DMALLOC_NAMED_LOCATION(" free")))   PMOD_EXPORT void debug_malloc_dump_references(void *x, int indent, int depth, int flags);   #define dmalloc_touch(TYPE,X) ((TYPE) debug_malloc_pass (X))   #define dmalloc_touch_named(TYPE,X,NAME) ((TYPE) debug_malloc_pass_named (X, NAME))   void debug_malloc_dump_fd(int fd); - #define dmalloc_touch_svalue(X) do { const struct svalue *_tmp = (X); if (_tmp->type <= MAX_REF_TYPE) { debug_malloc_touch(_tmp->u.refs); } } while(0) - #define dmalloc_touch_svalue_named(X,NAME) do { const struct svalue *_tmp = (X); if (_tmp->type <= MAX_REF_TYPE) { debug_malloc_touch_named(_tmp->u.refs,NAME); } } while(0) + #define dmalloc_touch_svalue(X) do { \ +  const struct svalue *_tmp = (X); \ +  if (TYPEOF(*_tmp) <= MAX_REF_TYPE) { \ +  debug_malloc_touch(_tmp->u.refs); \ +  } \ +  } while(0) + #define dmalloc_touch_svalue_named(X,NAME) do { \ +  const struct svalue *_tmp = (X); \ +  if (TYPEOF(*_tmp) <= MAX_REF_TYPE) { \ +  debug_malloc_touch_named(_tmp->u.refs,NAME); \ +  } \ +  } while(0)      #define DMALLOC_LINE_ARGS ,char * dmalloc_location   #define DMALLOC_POS ,DMALLOC_LOCATION()   #define DMALLOC_PROXY_ARGS ,dmalloc_location   PMOD_EXPORT void dmalloc_accept_leak(void *);   #define dmalloc_touch_fd(X) debug_malloc_touch_fd((X),DMALLOC_LOCATION())   #define dmalloc_register_fd(X) debug_malloc_register_fd((X),DMALLOC_LOCATION())   #define dmalloc_accept_leak_fd(X) debug_malloc_accept_leak_fd(X)   #define dmalloc_close_fd(X) debug_malloc_close_fd((X),DMALLOC_LOCATION())