From 025beea507890f97419ed36887077e4a720b8a78 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 27 May 2020 17:10:05 +0200 Subject: [PATCH] CLEANUP: debug: drop unused function p_malloc() This one was introduced 5 years ago for debugging and never really used. It is the one which used to cause circular dependencies issues. Let's drop it instead of starting to split the debug include in two. --- include/haproxy/debug.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/include/haproxy/debug.h b/include/haproxy/debug.h index f9d0f459c..f25680d4b 100644 --- a/include/haproxy/debug.h +++ b/include/haproxy/debug.h @@ -22,9 +22,6 @@ #ifndef _HAPROXY_DEBUG_H #define _HAPROXY_DEBUG_H -#include -#include - struct task; struct buffer; extern volatile unsigned long threads_to_dump; @@ -34,16 +31,4 @@ void ha_thread_dump(struct buffer *buf, int thr, int calling_tid); void ha_thread_dump_all_to_trash(); void ha_panic(); -/* This one is useful to automatically apply poisonning on an area returned - * by malloc(). Only "p_" is required to make it work, and to define a poison - * byte using -dM. - */ -static inline void *p_malloc(size_t size) -{ - void *ret = malloc(size); - if (mem_poison_byte >= 0 && ret) - memset(ret, mem_poison_byte, size); - return ret; -} - #endif /* _HAPROXY_DEBUG_H */