Get allocation size should be const

Change-Id: I6e6091e1df56fc012b74a76c3c737f122636ff0d
Reviewed-on: http://review.couchbase.org/37431
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>