syscall: NetlinkRIB, avoid allocation in loop
syscall: NetlinkRIB, avoid allocation in loop

NetlinkRIB is currently allocating a page sized slice of bytes in a
for loop and it's also calling Getpagesize() in the same for loop.

This CL changes NetlinkRIB to preallocate the page sized slice of
bytes before reaching the for loop. This reduces memory allocations
and lowers the number of calls to Getpagesize() to 1 per NetlinkRIB
call.

This CL reduces the allocated memory from 141.5 MB down to 52 MB in
a test.

LGTM=crawshaw, dave
R=dave, dsymonds, crawshaw
CC=bradfitz, dsymonds, golang-codereviews
https://codereview.appspot.com/110920043

Committer: Dave Cheney <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@cheney.net>

bryanxu/go-zh,d0f/go-zh,sanjosh/sanjos100-tipc,webfd/go-zh,sanjosh/sanjos100-tipc,bryanxu/go-zh,webfd/go-zh,webfd/go-zh,bryanxu/go-zh,bryanxu/go-zh,bryanxu/go-zh,webfd/go-zh,d0f/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,webfd/go-zh,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,webfd/go-zh,d0f/go-zh,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,webfd/go-zh,d0f/go-zh,bryanxu/go-zh,bryanxu/go-zh,d0f/go-zh,d0f/go-zh,webfd/go-zh,bryanxu/go-zh,d0f/go-zh