r600g: make range/block act more like a page table

only allocate the blocks ptr in the range if we ever have one,
otherwise don't bother wasting the memory.

valgrind glxinfo
before:
==967==     in use at exit: 419,754 bytes in 706 blocks
==967==   total heap usage: 3,552 allocs, 2,846 frees, 3,550,131 bytes allocated

after:
==5227==     in use at exit: 419,754 bytes in 706 blocks
==5227==   total heap usage: 3,452 allocs, 2,746 frees, 3,140,531 bytes allocate

Signed-off-by: Dave Airlie <airlied@redhat.com>
3 files changed