preallocate f