Update allocator.c

Fixes to pointer arithmatic