diff options
author | Søren Sandmann <ssp@redhat.com> | 2012-08-21 12:56:52 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-09-05 18:17:21 -0400 |
commit | e738d00e1fb3cd469f850765e2b42976c2a85764 (patch) | |
tree | 6aef1abe0f614ff89be7a789b2a2118fe2cbcb1f /src/qxl.h | |
parent | 4a43bd436c58dae72f91905657a36158efc68907 (diff) |
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.
Diffstat (limited to 'src/qxl.h')
-rw-r--r-- | src/qxl.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |