Don't share g_malloc_heap_size between libraries
Change-Id: Ic70bf83d4f865bc5c453941fdbc1814c77f0ad9d
Esse commit está contido em:
@@ -23,6 +23,7 @@ THE SOFTWARE.
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip_hcc.h"
|
||||
#include "trace_helper.h"
|
||||
#include "device_util.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//Devices
|
||||
@@ -97,8 +98,6 @@ hipError_t hipDeviceGetCacheConfig(hipFuncCache_t *cacheConfig)
|
||||
return ihipLogStatus(hipSuccess);
|
||||
}
|
||||
|
||||
extern "C" size_t g_malloc_heap_size;
|
||||
|
||||
hipError_t hipDeviceGetLimit (size_t *pValue, hipLimit_t limit)
|
||||
{
|
||||
HIP_INIT_API(pValue, limit);
|
||||
@@ -106,7 +105,7 @@ hipError_t hipDeviceGetLimit (size_t *pValue, hipLimit_t limit)
|
||||
return ihipLogStatus(hipErrorInvalidValue);
|
||||
}
|
||||
if(limit == hipLimitMallocHeapSize) {
|
||||
*pValue = g_malloc_heap_size;
|
||||
*pValue = (size_t)SIZE_OF_HEAP;
|
||||
return ihipLogStatus(hipSuccess);
|
||||
}else{
|
||||
return ihipLogStatus(hipErrorUnsupportedLimit);
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário