}
ValueProfData *allocValueProfDataInstrProf(size_t TotalSizeInBytes) {
- return (ValueProfData *)(new (::operator new(TotalSizeInBytes))
- ValueProfData());
+ ValueProfData *VD =
+ (ValueProfData *)(new (::operator new(TotalSizeInBytes)) ValueProfData());
+ memset(VD, 0, TotalSizeInBytes);
+ return VD;
}
static ValueProfRecordClosure InstrProfRecordClosure = {
getNumValueDataForSiteInstrProf,
stringToHash,
getValueForSiteInstrProf,
- allocValueProfDataInstrProf
-};
+ allocValueProfDataInstrProf};
// Wrapper implementation using the closure mechanism.
uint32_t ValueProfData::getSize(const InstrProfRecord &Record) {