diff options
author | Caio Oliveira <caio.oliveira@intel.com> | 2023-09-18 14:24:00 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-10-07 01:34:13 +0000 |
commit | 5fa2b33d56c198bee0ae1c2f0bba8f79223b1482 (patch) | |
tree | 206873409f9e9ddec1bd155a9457c700340305ea /src/util | |
parent | 32b361089c59d0677aa8cca39c2398f74fbb61d2 (diff) | |
download | mesa-5fa2b33d56c198bee0ae1c2f0bba8f79223b1482.tar.gz mesa-5fa2b33d56c198bee0ae1c2f0bba8f79223b1482.tar.bz2 mesa-5fa2b33d56c198bee0ae1c2f0bba8f79223b1482.zip |
util: Add size to ralloc_header in debug mode
For 64-bit environments this just fills a padding. Will enable
dumping more information when debugging ralloc trees.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25482>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/ralloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/ralloc.c b/src/util/ralloc.c index b760ddb0a68..3b51b7fa474 100644 --- a/src/util/ralloc.c +++ b/src/util/ralloc.c @@ -55,6 +55,7 @@ struct ralloc_header #ifndef NDEBUG /* A canary value used to determine whether a pointer is ralloc'd. */ unsigned canary; + unsigned size; #endif struct ralloc_header *parent; @@ -139,6 +140,7 @@ ralloc_size(const void *ctx, size_t size) #ifndef NDEBUG info->canary = CANARY; + info->size = size; #endif return PTR_FROM_HEADER(info); |