diff options
author | Dave Airlie <airlied@redhat.com> | 2009-02-04 13:16:41 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-04 13:16:41 +1000 |
commit | e44effcfcba4591a622e47ee1b4807ddf5789d51 (patch) | |
tree | fa0a9872e3889884ea9907524ec0f029540f8dcb /src/mesa/drivers | |
parent | 711cbf30a1ce72338ca9f1c0f71bd530754a4bd9 (diff) |
radeon: call getpagesize once and store in a static
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_bo_legacy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c index 993bac8124..a716f1059b 100644 --- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c @@ -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; |