SWDEV-431399 - fix first set of memory leaks in clr, found in rtc tests
change constexpr variable names to match the C++ style we follow. Change-Id: Ibc59a65d8ff2ca765da7bf5e653c0650fb3714c4
Este cometimento está contido em:
1 ascendente
f6e0f2613c
cometimento
ce27581465
4 ficheiros modificados
+31
-26
Não existem ficheiros que correspondam à sua pesquisa
@@ -88,6 +88,10 @@ inline bool getIsaMeta(std::string isaName, amd_comgr_metadata_node_t& isaMeta)
|
||||
return (status == AMD_COMGR_STATUS_SUCCESS) ? true : false;
|
||||
}
|
||||
|
||||
inline bool releaseIsaMeta(amd_comgr_metadata_node_t& isaMeta) {
|
||||
return AMD_COMGR_STATUS_SUCCESS == amd::Comgr::destroy_metadata(isaMeta);
|
||||
}
|
||||
|
||||
bool getValueFromIsaMeta(amd_comgr_metadata_node_t& isaMeta, const char* key,
|
||||
std::string& retValue) {
|
||||
amd_comgr_status_t status;
|
||||
@@ -102,6 +106,9 @@ bool getValueFromIsaMeta(amd_comgr_metadata_node_t& isaMeta, const char* key,
|
||||
retValue.resize(size - 1);
|
||||
status = amd::Comgr::get_metadata_string(valMeta, &size, &(retValue[0]));
|
||||
}
|
||||
if (status == AMD_COMGR_STATUS_SUCCESS) {
|
||||
status = amd::Comgr::destroy_metadata(valMeta);
|
||||
}
|
||||
|
||||
return (status == AMD_COMGR_STATUS_SUCCESS) ? true : false;
|
||||
}
|
||||
@@ -1726,6 +1733,9 @@ bool Device::populateOCLDeviceConstants() {
|
||||
info_.availableSGPRs_ = (getValueFromIsaMeta(isaMeta, "AddressableNumSGPRs", sgprValue))
|
||||
? (atoi(sgprValue.c_str()))
|
||||
: 0;
|
||||
if (!releaseIsaMeta(isaMeta)) {
|
||||
LogInfo("Can not release the isa meta node");
|
||||
}
|
||||
}
|
||||
|
||||
// Generic support for HMM interfaces
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador