use malloc instead of zmalloc lib