fix memheap void pointer arithmetics
Refs #3763