create_temp_file() already creates a zeroed file with the given size (total_size), so there should be no need to clear them explicitly. What bug have you specifically run into, and would you write regression tests for it? -- Sincerely, Jinoh Kang