summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/os/os_memory_debug.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-04-03 13:36:50 -0600
committerBrian Paul <brianp@vmware.com>2013-04-04 08:50:15 -0600
commit92e5e45ff1147232699be9e517c70146e6ed0291 (patch)
tree57d5a076d2e036e419257f24cf36f71c4fc947e0 /src/gallium/auxiliary/os/os_memory_debug.h
parenta408ea96920984ad2c5bf81f799cbb583f264105 (diff)
downloadexternal_mesa3d-92e5e45ff1147232699be9e517c70146e6ed0291.zip
external_mesa3d-92e5e45ff1147232699be9e517c70146e6ed0291.tar.gz
external_mesa3d-92e5e45ff1147232699be9e517c70146e6ed0291.tar.bz2
util: add debug_memory_check_block(), debug_memory_tag()
The former just checks that the given block is valid by checking the header and footer. The later sets the memory block's tag. With extra debug code, we can use that for monitoring/checking particular allocations. Reviewed-by: José Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/os/os_memory_debug.h')
-rw-r--r--src/gallium/auxiliary/os/os_memory_debug.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/os/os_memory_debug.h b/src/gallium/auxiliary/os/os_memory_debug.h
index 36b8fc6..9a487de 100644
--- a/src/gallium/auxiliary/os/os_memory_debug.h
+++ b/src/gallium/auxiliary/os/os_memory_debug.h
@@ -60,6 +60,12 @@ void *
debug_realloc(const char *file, unsigned line, const char *function,
void *old_ptr, size_t old_size, size_t new_size );
+void
+debug_memory_tag(void *ptr, unsigned tag);
+
+void
+debug_memory_check_block(void *ptr);
+
void
debug_memory_check(void);