mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 16:28:08 +02:00
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>
This commit is contained in:
parent
32b361089c
commit
5fa2b33d56
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue