mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-01 09:18:19 +02:00
radeon: call getpagesize once and store in a static
This commit is contained in:
parent
711cbf30a1
commit
e44effcfcb
1 changed files with 4 additions and 1 deletions
|
|
@ -260,7 +260,10 @@ static struct bo_legacy *bo_allocate(struct bo_manager_legacy *boml,
|
|||
uint32_t flags)
|
||||
{
|
||||
struct bo_legacy *bo_legacy;
|
||||
uint32_t pgsize = getpagesize() - 1;
|
||||
static int pgsize;
|
||||
|
||||
if (pgsize == 0)
|
||||
pgsize = getpagesize() - 1;
|
||||
|
||||
size = (size + pgsize) & ~pgsize;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue