From af3d17af8b55bc02f88b0076fb3531c9cc81aba3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 4 Jun 2018 21:22:47 +0200 Subject: [PATCH] Revert "- fix memory arena allocation alignment for 32 bit systems." This reverts commit 23fce56b5e14615991de9937dcebc2c740eac6b9. This did not do what it was supposed to because of how the block header was created. --- src/memarena.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/memarena.cpp b/src/memarena.cpp index 2c0336a5e..d19521edf 100644 --- a/src/memarena.cpp +++ b/src/memarena.cpp @@ -55,14 +55,13 @@ struct FMemArena::Block // // RoundPointer // -// Rounds a pointer up to the size of the largest integral type. +// Rounds a pointer up to a pointer-sized boundary. // //========================================================================== static inline void *RoundPointer(void *ptr) { - const auto roundsize = std::max(sizeof(void*), sizeof(double)); - return (void *)(((size_t)ptr + roundsize - 1) & ~(roundsize - 1)); + return (void *)(((size_t)ptr + sizeof(void*) - 1) & ~(sizeof(void*) - 1)); } //==========================================================================