util: Remove per-buffer header in linear alloc for release mode
authorCaio Oliveira <caio.oliveira@intel.com>
Mon, 18 Sep 2023 17:05:01 +0000 (10:05 -0700)
committerMarge Bot <emma+marge@anholt.net>
Mon, 25 Sep 2023 17:26:17 +0000 (17:26 +0000)
commit591db9a9a54d9d5d4d34e1f0c6b680a4933b401a
tree3f4c01386611d1a5cbb76c0ffe1af45f5bda45b5
parentc415da3dfc3de687f20173f90c7420eaf218c638
util: Remove per-buffer header in linear alloc for release mode

There's only need to keep the offset and size of the latest buffer,
so rename linear_header into linear_ctx and change the code to
keep records there.

For debug mode we still keep a header, now called linear_node_canary,
to have a magic check.  Since due to alignment we have a free space,
also keep the individual occupation of each node (offset), for
debugging.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25280>
src/util/ralloc.c