mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
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.
This commit is contained in:
@ -60,21 +60,10 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
* Uncomment this to make all memory allocation operations return addresses
|
||||
* which are aligned to a multiple of MEM_BLOCKSIZE (see <exec/memory.h>).
|
||||
* 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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user