sizeof(pointer) will give you the size of a pointer, not the space
allocated to it. I noticed this when gcc complained:
resvtest.c:76:33: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
memset(writebuffer, 'A', sizeof(writebuffer));
Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Dave Chinner <david@fromorbit.com>