Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/FBGEMM.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorYoung Jin Kim <youki@microsoft.com>2019-06-14 19:22:49 +0300
committerYoung Jin Kim <youki@microsoft.com>2019-06-14 19:22:49 +0300
commitb4e3a9ceb703e186637a884959c1153fc6e0f9b4 (patch)
treea7443cb1c4e30b7f40232a2152bccd24bc52b4fe /bench
parentd402bed4f186a90fddcbdb43dd655b221e7673c2 (diff)
Improve some memroy allocation codes
Diffstat (limited to 'bench')
-rw-r--r--bench/AlignedVec.h3
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