Allocates memory on a specified alignment boundary
| 13 | inline namespace Win32 { |
| 14 | /// Allocates memory on a specified alignment boundary |
| 15 | static inline void * aligned_malloc( |
| 16 | size_t nSize, ///< Size of the requested memory allocation |
| 17 | size_t nAlignment ///< The alignment value, which must be an integer power of 2 |
| 18 | ) |
| 19 | { |
| 20 | return ::_aligned_malloc( nSize, nAlignment ); |
| 21 | } |
| 22 | |
| 23 | /// Frees a block of memory that was allocated with aligned_malloc. |
| 24 | static inline void aligned_free( |