use malloc instead of memalign in buddy.c, modify interface of ts module