Skip to content

Fix invalid alignment value for _aligned_malloc in Windows#2671

Open
joselopeqti wants to merge 3 commits intoKhronosGroup:cl_khr_unified_svmfrom
joselopeqti:fix_host_malloc_alignment
Open

Fix invalid alignment value for _aligned_malloc in Windows#2671
joselopeqti wants to merge 3 commits intoKhronosGroup:cl_khr_unified_svmfrom
joselopeqti:fix_host_malloc_alignment

Conversation

@joselopeqti
Copy link
Copy Markdown
Collaborator

The Device Maximum Alignment is set up to zero when using the USM wrapper to allocate a System type allocation.
This value is used for the alignment param in the _aligned_malloc function if the test is run on Windows. In this case, alignment must be a power of 2 _aligned_malloc :

If alignment isn't a power of 2 or size is zero, this function invokes the invalid parameter handler, as described in Parameter validation.

Comment thread test_conformance/SVM/test_unified_svm_mem_cpy.cpp Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants