fix cmake, use calloc to reserve pre-zeroed memory