summaryrefslogtreecommitdiffstats
path: root/vespamalloc/src/tests/test1/new_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vespamalloc/src/tests/test1/new_test.cpp')
-rw-r--r--vespamalloc/src/tests/test1/new_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/vespamalloc/src/tests/test1/new_test.cpp b/vespamalloc/src/tests/test1/new_test.cpp
index 5d31493aaf9..2400e41a1d9 100644
--- a/vespamalloc/src/tests/test1/new_test.cpp
+++ b/vespamalloc/src/tests/test1/new_test.cpp
@@ -12,8 +12,9 @@ void cmp(const void *base, size_t offset, const void *p) {
}
template <typename S>
-void veryfy_aligned(const S * p) {
+void veryfy_aligned(S * p) {
EXPECT_TRUE((uintptr_t(p) % alignof(S)) == 0);
+ memset(p, 0, sizeof(S));
}
TEST("verify new with normal alignment") {