From 8a4a75e721e3baa20bfb4afb7e74b5b1bf04f8e7 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Wed, 6 Sep 2023 13:20:10 +0200 Subject: [PATCH] Optionally, the slab allocator can be built to deliver 64-bit aligned allocations by default. Also, the slab allocator is no longer enabled at build time. --- library/stdlib_memory.h | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/library/stdlib_memory.h b/library/stdlib_memory.h index 177243a..9dda55c 100644 --- a/library/stdlib_memory.h +++ b/library/stdlib_memory.h @@ -60,21 +60,10 @@ /****************************************************************************/ -/* - * Uncomment this to make all memory allocation operations return addresses - * which are aligned to a multiple of MEM_BLOCKSIZE (see ). - * This renders them 64 bit aligned which can be useful for floating point - * numbers in data structures used by the PowerPC. You pay for this privilege - * by spending an additional 4 bytes per allocation. - */ -#define __MEM_ALLOCATIONS_64_BIT_ALIGNED - -/****************************************************************************/ - /* * Uncomment this to enable the slab allocator. */ -#define __USE_SLAB_ALLOCATOR +/*#define __USE_SLAB_ALLOCATOR*/ /****************************************************************************/ @@ -178,7 +167,7 @@ struct MemoryNode struct MinNode mn_MinNode; UBYTE mn_AlreadyFree; - UBYTE mn_Pad0[7]; /* Note: provide 64 bit alignment */ + UBYTE mn_Pad0[3]; void * mn_Allocation; size_t mn_AllocationSize; @@ -199,10 +188,6 @@ struct MemoryNode #endif /* __MEM_DEBUG */ -#ifdef __MEM_ALLOCATIONS_64_BIT_ALIGNED - ULONG mn_Alignment; -#endif /* __MEM_ALLOCATIONS_64_BIT_ALIGNED */ - ULONG mn_Size; }; @@ -267,9 +252,6 @@ struct SlabNode struct SlabSingleAllocation { struct MinNode ssa_MinNode; -#ifdef __MEM_ALLOCATIONS_64_BIT_ALIGNED - ULONG ssa_Alignment; -#endif /* __MEM_ALLOCATIONS_64_BIT_ALIGNED */ ULONG ssa_Size; };