add mem.c to libc for memory operation