Fixed optimize bug in 'mem.c' caused due to some gcc versions differences