Cast allocation to avoid compiler warnings.