mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 07:41:38 +00:00
Fix unit test on FreeBSD. We need to make sure there is enough space to save the pointer even if the memory returned from malloc was already aligned.
llvm-svn: 78805
This commit is contained in:
parent
5ce04c066b
commit
a191584fca
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user