use posix_memalign on linux, not valloc since it doesn't work very well