diff options
author | Young Jin Kim <youki@microsoft.com> | 2019-06-14 19:22:49 +0300 |
---|---|---|
committer | Young Jin Kim <youki@microsoft.com> | 2019-06-14 19:22:49 +0300 |
commit | b4e3a9ceb703e186637a884959c1153fc6e0f9b4 (patch) | |
tree | a7443cb1c4e30b7f40232a2152bccd24bc52b4fe /bench | |
parent | d402bed4f186a90fddcbdb43dd655b221e7673c2 (diff) |
Improve some memroy allocation codes
Diffstat (limited to 'bench')
-rw-r--r-- | bench/AlignedVec.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bench/AlignedVec.h b/bench/AlignedVec.h index 8b3ff14..0b8c7ce 100644 --- a/bench/AlignedVec.h +++ b/bench/AlignedVec.h @@ -102,7 +102,8 @@ class aligned_allocator { #ifdef _MSC_VER pv = _aligned_malloc(n * sizeof(T), Alignment); #else - posix_memalign(&pv, Alignment, n * sizeof(T)); + int result = posix_memalign(&pv, Alignment, n * sizeof(T)); + assert(result == 0); #endif // Allocators should throw std::bad_alloc in the case of memory allocation |