Add alloc directory and ndelay functions