diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-06-09 14:14:23 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-06-09 14:14:23 +0000 |
commit | 642a5f52a2bbdcb5f02aea4415d502af10331593 (patch) | |
tree | e67bd3755e29968f52e3139ac6766380828d3104 /vespamalloc/src/tests/test1 | |
parent | 1ab52f43ca7877c08b93408d7bcf8b0355c007e4 (diff) |
Store alignmnet so that tail magic is computed correctly.
Diffstat (limited to 'vespamalloc/src/tests/test1')
-rw-r--r-- | vespamalloc/src/tests/test1/new_test.cpp | 3 |
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") { |