Skip to content

Commit 4ebcecd

Browse files
Fix missing case
1 parent 3b4655d commit 4ebcecd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sycl/include/CL/sycl/usm.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ T *malloc(
267267
const property_list &PropList = {},
268268
const detail::code_location CodeLoc = detail::code_location::current()) {
269269
return static_cast<T *>(
270-
malloc(Count * sizeof(T), Dev, Ctxt, Kind, PropList, CodeLoc));
270+
aligned_alloc(std::max(alignof(T), alignof(std::max_align_t)),
271+
Count * sizeof(T), Dev, Ctxt, Kind, PropList, CodeLoc));
271272
}
272273

273274
template <typename T>

0 commit comments

Comments
 (0)