declare return length consistent

Reported-by: Christian Obersteiner
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
define whole access API as unsigned int

Cope with maximal size of allocatable chunk and define API unsigned int.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>