From d928ac059c2fb175974af0b1abdf888f5f7db2cb Mon Sep 17 00:00:00 2001 From: niranjanjoshi121 <43807392+niranjanjoshi121@users.noreply.github.com> Date: Mon, 12 Sep 2022 17:12:06 +0530 Subject: [PATCH] Use correct size for memory allocation in SVM test (#1496) Memory is allocated for cl_int, but mapped as size_t. Use size_t instead of cl_int during allocation and mapping for consistency. --- test_conformance/SVM/test_shared_address_space_fine_grain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_conformance/SVM/test_shared_address_space_fine_grain.cpp b/test_conformance/SVM/test_shared_address_space_fine_grain.cpp index a98a880c..3350972e 100644 --- a/test_conformance/SVM/test_shared_address_space_fine_grain.cpp +++ b/test_conformance/SVM/test_shared_address_space_fine_grain.cpp @@ -47,7 +47,7 @@ int test_svm_shared_address_space_fine_grain(cl_device_id deviceID, cl_context c test_error2(error, pNodes, "malloc failed"); // this allocation holds an index into the nodes buffer, it is used for node allocation - size_t* pAllocator = (size_t*) align_malloc(sizeof(cl_int), 128); + size_t *pAllocator = (size_t *)align_malloc(sizeof(size_t), 128); test_error2(error, pAllocator, "malloc failed"); // this allocation holds the count of correct nodes, which is computed by the verify kernel.