util: Remove linear_realloc()
authorCaio Oliveira <caio.oliveira@intel.com>
Mon, 18 Sep 2023 09:34:34 +0000 (02:34 -0700)
committerMarge Bot <emma+marge@anholt.net>
Mon, 25 Sep 2023 17:26:17 +0000 (17:26 +0000)
commit8fc130783b220c2d94f4960a7613615ca4c75091
tree05066f841ec773438619816b203d76b00a8d5728
parent1486742b26943c65f21867969309cbc970d363dd
util: Remove linear_realloc()

Now that linear_realloc() is unused, remove it.  It is not an actual
realloc, will always allocate new memory and copy data around -- and
had a big warning about it in the documentation.

In the couple of uses we had before, the client code knew the size,
so it could be changed to perform the allocation and the copy by
themselves.  The client code keeping the size is the recommended
way here.

This will allow us remove linear_size_chunk later.

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