util: move debug_memory_{begin,end} to os_memory_debug.h
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 19 Feb 2020 11:51:08 +0000 (12:51 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 24 Feb 2020 23:07:57 +0000 (23:07 +0000)
This is where the other debug_memory_* functions are declared, so let's
move it here for symmetry.

This allows us to drop an include of u_debug_gallium.h, which makes us
depend on gallium-headers in non-gallium code.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3901>

src/gallium/auxiliary/util/u_debug_gallium.h
src/gallium/state_trackers/wgl/stw_device.c
src/util/os_memory_debug.h
src/util/u_debug_memory.c

index 0710ce2b7034dfec60a5408399f06d87ba004d7f..df4e919c803d5118fc743bcecb6d5c431684eda5 100644 (file)
 extern "C" {
 #endif
 
 extern "C" {
 #endif
 
-unsigned long
-debug_memory_begin(void);
-
-void 
-debug_memory_end(unsigned long beginning);
-
 #ifdef DEBUG
 void debug_print_format(const char *msg, unsigned fmt);
 #else
 #ifdef DEBUG
 void debug_print_format(const char *msg, unsigned fmt);
 #else
index f1b1dfd9a14af9bdc10e89cb7ff074396a0379a1..d88b37f7225b36d2136efbe6888a114e7acfe617 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "glapi/glapi.h"
 #include "util/u_debug.h"
 
 #include "glapi/glapi.h"
 #include "util/u_debug.h"
-#include "util/u_debug_gallium.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "pipe/p_screen.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "pipe/p_screen.h"
index 8f3e936cbbf5b53f990c12d547302ec7968425c7..020f46fb3d1371406c7d6200d80d6a22abedcefc 100644 (file)
@@ -57,6 +57,12 @@ void *
 debug_realloc(const char *file, unsigned line, const char *function,
               void *old_ptr, size_t old_size, size_t new_size );
 
 debug_realloc(const char *file, unsigned line, const char *function,
               void *old_ptr, size_t old_size, size_t new_size );
 
+unsigned long
+debug_memory_begin(void);
+
+void
+debug_memory_end(unsigned long start_no);
+
 void
 debug_memory_tag(void *ptr, unsigned tag);
 
 void
 debug_memory_tag(void *ptr, unsigned tag);
 
index e468fd0b2525a9bb0239d630647e365c8ac698da..e5e1b630489b229c5acf049ab24c740ff1b807b3 100644 (file)
@@ -39,7 +39,6 @@
 #include "os/os_thread.h"
 
 #include "util/u_debug.h"
 #include "os/os_thread.h"
 
 #include "util/u_debug.h"
-#include "util/u_debug_gallium.h"
 #include "util/u_debug_stack.h"
 #include "util/list.h"
 #include "util/os_memory.h"
 #include "util/u_debug_stack.h"
 #include "util/list.h"
 #include "util/os_memory.h"