Skip to content

Commit b21d054

Browse files
committed
Fix test compilation for Emscripten
1 parent a3ea7a8 commit b21d054

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/memory_tracker.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ void* allocate(std::size_t size, bool array, std::align_val_t align) {
2929
} else {
3030
# if defined(OUP_PLATFORM_WINDOWS)
3131
p = _aligned_malloc(size, static_cast<std::size_t>(align));
32+
# elif defined(OUP_PLATFORM_EMSCRIPTEN)
33+
p = aligned_alloc(static_cast<std::size_t>(align), size);
3234
# else
3335
p = std::aligned_alloc(static_cast<std::size_t>(align), size);
3436
# endif

0 commit comments

Comments
 (0)