util/vma: Add an option to configure high/low preference
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 29 Aug 2019 18:04:25 +0000 (13:04 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 May 2020 23:36:44 +0000 (23:36 +0000)
commitadbcef37d2d1f838ef24a4ab1f4332cc87b5fdad
tree8ab39cd657acf90a5eaac6fac1877888571afd8a
parentf40f8f623a021d791886ca8e1a159e34cfcb4bfb
util/vma: Add an option to configure high/low preference

The vma_heap allocator was originally designed to prefer high addresses
in order to find bugs in ANV's high address handling.  However, there
are cases where you might want the allocator to prefer lower addresses
for some reason.  This provides a configure bit for exactly this
purpose.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
src/util/vma.c
src/util/vma.h