I would like to post this as a comment as it only partially responds, but it is too long for that.
, .
malloc() free() , B-16 CUDA 7.5 :
__global__ void mallocTest()
{
size_t size = 123;
char* ptr = (char*)malloc(size);
memset(ptr, 0, size);
printf("Thread %d got pointer: %p\n", threadIdx.x, ptr);
free(ptr);
}
int main()
{
cudaDeviceSetLimit(cudaLimitMallocHeapSize, 128*1024*1024);
mallocTest<<<1, 5>>>();
cudaDeviceSynchronize();
return 0;
}
( 2.x )
, - - "", (, ..).
, , " " .
, /, .