Rest of code assumes that allocated memory is filled with zeroes