add HF_CALLOC and HF_FREE