Don't share g_malloc_heap_size between libraries

Change-Id: Ic70bf83d4f865bc5c453941fdbc1814c77f0ad9d
Esse commit está contido em:
Maneesh Gupta
2016-12-05 11:03:45 +05:30
commit 1cf9332c3f
3 arquivos alterados com 41 adições e 12 exclusões
+2 -3
Ver Arquivo
@@ -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);