Skip to content

Commit 620dde4

Browse files
committed
Don't use non-standard header for C11/C++17 aligned_alloc()
$ c++ -std=c++11 src/*.cpp -lvulkan In file included from src/VmaUsage.h:35:0, from src/VmaUsage.cpp:8: src/vk_mem_alloc.h:2233:47: fatal error: malloc.h: No such file or directory #include <malloc.h> // for aligned_alloc() ^
1 parent bb99d69 commit 620dde4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/vk_mem_alloc.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,10 +2229,6 @@ remove them if not needed.
22292229
#include <mutex> // for std::mutex
22302230
#include <atomic> // for std::atomic
22312231

2232-
#if !defined(_WIN32) && !defined(__APPLE__)
2233-
#include <malloc.h> // for aligned_alloc()
2234-
#endif
2235-
22362232
#ifndef VMA_NULL
22372233
// Value used as null pointer. Define it to e.g.: nullptr, NULL, 0, (void*)0.
22382234
#define VMA_NULL nullptr

0 commit comments

Comments
 (0)