mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-24 12:45:56 +01:00
Clearer UVM ttreatment
This commit is contained in:
parent
fd3f93d8d3
commit
8c913e0edd
@ -53,7 +53,11 @@ public:
|
|||||||
{
|
{
|
||||||
size_type bytes = __n*sizeof(_Tp);
|
size_type bytes = __n*sizeof(_Tp);
|
||||||
profilerAllocate(bytes);
|
profilerAllocate(bytes);
|
||||||
|
#ifdef GRID_UVM
|
||||||
|
_Tp *ptr = (_Tp*) MemoryManager::SharedAllocate(bytes);
|
||||||
|
#else
|
||||||
_Tp *ptr = (_Tp*) MemoryManager::CpuAllocate(bytes);
|
_Tp *ptr = (_Tp*) MemoryManager::CpuAllocate(bytes);
|
||||||
|
#endif
|
||||||
assert( ( (_Tp*)ptr != (_Tp *)NULL ) );
|
assert( ( (_Tp*)ptr != (_Tp *)NULL ) );
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
@ -62,7 +66,11 @@ public:
|
|||||||
{
|
{
|
||||||
size_type bytes = __n * sizeof(_Tp);
|
size_type bytes = __n * sizeof(_Tp);
|
||||||
profilerFree(bytes);
|
profilerFree(bytes);
|
||||||
|
#ifdef GRID_UVM
|
||||||
|
MemoryManager::SharedFree((void *)__p,bytes);
|
||||||
|
#else
|
||||||
MemoryManager::CpuFree((void *)__p,bytes);
|
MemoryManager::CpuFree((void *)__p,bytes);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: hack for the copy constructor, eventually it must be avoided
|
// FIXME: hack for the copy constructor, eventually it must be avoided
|
||||||
|
Loading…
x
Reference in New Issue
Block a user