use memmove() in scalegraph()