radeon: call getpagesize once and store in a static

This commit is contained in:
Dave Airlie 2009-02-04 13:16:41 +10:00
parent 711cbf30a1
commit e44effcfcb

View file

@ -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;