diff options
Diffstat (limited to 'unittests/Support/AllocatorTest.cpp')
-rw-r--r-- | unittests/Support/AllocatorTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/Support/AllocatorTest.cpp b/unittests/Support/AllocatorTest.cpp index 463760d2f0..2a01f3a9c4 100644 --- a/unittests/Support/AllocatorTest.cpp +++ b/unittests/Support/AllocatorTest.cpp @@ -108,7 +108,7 @@ public: void *MemBase = malloc(Size + Alignment - 1 + sizeof(void*)); // Make the slab. - MemSlab *Slab = (MemSlab*)(((uintptr_t)MemBase + Alignment - 1) & + MemSlab *Slab = (MemSlab*)(((uintptr_t)MemBase+sizeof(void*)+Alignment-1) & ~(uintptr_t)(Alignment - 1)); Slab->Size = Size; Slab->NextPtr = 0; |