Merge pull request #148 from res2k/vma_aligned_alloc-tweaks

Some tweaks to vma_aligned_alloc()
diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h
index 4c9912a..bc60ac2 100644
--- a/src/vk_mem_alloc.h
+++ b/src/vk_mem_alloc.h
@@ -1749,7 +1749,7 @@
 When device memory of certain heap runs out of free space, new allocations may

 fail (returning error code) or they may succeed, silently pushing some existing

 memory blocks from GPU VRAM to system RAM (which degrades performance). This

-behavior is implementation-dependant - it depends on GPU vendor and graphics

+behavior is implementation-dependent - it depends on GPU vendor and graphics

 driver.

 

 On AMD cards it can be controlled while creating Vulkan device object by using

@@ -2000,16 +2000,6 @@
 

 */

 

-#if VMA_RECORDING_ENABLED

-    #include <chrono>

-    #if defined(_WIN32)

-        #include <windows.h>

-    #else

-        #include <sstream>

-        #include <thread>

-    #endif

-#endif

-

 #ifdef __cplusplus

 extern "C" {

 #endif

@@ -2022,7 +2012,7 @@
     #define VMA_RECORDING_ENABLED 0

 #endif

 

-#ifndef NOMINMAX

+#if !defined(NOMINMAX) && defined(VMA_IMPLEMENTATION)

     #define NOMINMAX // For windows.h

 #endif

 

@@ -2859,7 +2849,7 @@
     VkMemoryPropertyFlags requiredFlags;

     /** \brief Flags that preferably should be set in a memory type chosen for an allocation.

     

-    Set to 0 if no additional flags are prefered. \n

+    Set to 0 if no additional flags are preferred. \n

     If `pool` is not null, this member is ignored. */

     VkMemoryPropertyFlags preferredFlags;

     /** \brief Bitmask containing one bit set for every memory type acceptable for this allocation.

@@ -3329,7 +3319,7 @@
 

 /** \brief Returns current information about specified allocation and atomically marks it as used in current frame.

 

-Current paramters of given allocation are returned in `pAllocationInfo`.

+Current paramteres of given allocation are returned in `pAllocationInfo`.

 

 This function also atomically "touches" allocation - marks it as used in current frame,

 just like vmaTouchAllocation().

@@ -3966,6 +3956,16 @@
 #include <cstring>

 #include <utility>

 

+#if VMA_RECORDING_ENABLED

+    #include <chrono>

+    #if defined(_WIN32)

+        #include <windows.h>

+    #else

+        #include <sstream>

+        #include <thread>

+    #endif

+#endif

+

 /*******************************************************************************

 CONFIGURATION SECTION