Get allocation size should be const

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