Don't share g_malloc_heap_size between libraries

Change-Id: Ic70bf83d4f865bc5c453941fdbc1814c77f0ad9d


[ROCm/hip commit: 1cf9332c3f]
Цей коміт міститься в:
Maneesh Gupta
2016-12-05 11:03:45 +05:30
джерело 891f956313
коміт 7a48767acc
3 змінених файлів з 41 додано та 12 видалено
+2 -3
Переглянути файл
@@ -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);