mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Revert "- fix memory arena allocation alignment for 32 bit systems."
This reverts commit 23fce56b5e
.
This did not do what it was supposed to because of how the block header was created.
This commit is contained in:
parent
780ddd21bd
commit
af3d17af8b
1 changed files with 2 additions and 3 deletions
|
@ -55,14 +55,13 @@ struct FMemArena::Block
|
||||||
//
|
//
|
||||||
// RoundPointer
|
// 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)
|
static inline void *RoundPointer(void *ptr)
|
||||||
{
|
{
|
||||||
const auto roundsize = std::max(sizeof(void*), sizeof(double));
|
return (void *)(((size_t)ptr + sizeof(void*) - 1) & ~(sizeof(void*) - 1));
|
||||||
return (void *)(((size_t)ptr + roundsize - 1) & ~(roundsize - 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue