From e738d00e1fb3cd469f850765e2b42976c2a85764 Mon Sep 17 00:00:00 2001 From: Søren Sandmann Date: Tue, 21 Aug 2012 12:56:52 -0400 Subject: Improved support for memory debugging. Make all memory allocation functions take a string that will explain what the memory will be used for. This allows debug print statements to be added to the allocation functions and could later potentially be used for more detailed statistics. --- src/qxl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/qxl.h') diff --git a/src/qxl.h b/src/qxl.h index 1d9ca75..d976fd5 100644 --- a/src/qxl.h +++ b/src/qxl.h @@ -446,12 +446,15 @@ struct qxl_mem * qxl_mem_create (void *base, void qxl_mem_dump_stats (struct qxl_mem *mem, const char *header); void * qxl_alloc (struct qxl_mem *mem, - unsigned long n_bytes); + unsigned long n_bytes, + const char * name); void qxl_free (struct qxl_mem *mem, - void *d); + void *d, + const char * name); void qxl_mem_free_all (struct qxl_mem *mem); void * qxl_allocnf (qxl_screen_t *qxl, - unsigned long size); + unsigned long size, + const char * name); int qxl_garbage_collect (qxl_screen_t *qxl); #ifdef DEBUG_QXL_MEM -- cgit v1.2.3