Used libc to clear memory