HeapAllocatorInitAligned
Description
Initialize a HeapAllocator with a custom alignment floor. Over-page-aligned requests bypass the bin path and go straight to the embedded PageAllocator.
Usage example (Cross-references)
Usage examples (Cross-references)
static bool test_overaligned_alloc(void) {
HeapAllocator heap = HeapAllocatorInitAligned(64);
Allocator *alloc = ALLOCATOR_OF(&heap);- In
Vec.Init.c:80:
WriteFmt("Testing VecInit with aligned allocator\n");
HeapAllocator aligned4 = HeapAllocatorInitAligned(4);
HeapAllocator aligned16 = HeapAllocatorInitAligned(16);- In
Vec.Init.c:81:
HeapAllocator aligned4 = HeapAllocatorInitAligned(4);
HeapAllocator aligned16 = HeapAllocatorInitAligned(16);
// Test with int type and 4-byte alignment
- In
Vec.Init.c:135:
WriteFmt("Testing VecInit with aligned allocator and deep copy\n");
HeapAllocator aligned8 = HeapAllocatorInitAligned(8);
// Test with struct type, custom copy/deinit functions, and 8-byte alignment
- In
Vec.Init.c:163:
// allocator's settings.
HeapAllocator h_default = HeapAllocatorInit();
HeapAllocator h8 = HeapAllocatorInitAligned(8);
HeapAllocator h16 = HeapAllocatorInitAligned(16);
HeapAllocator h32 = HeapAllocatorInitAligned(32);- In
Vec.Init.c:164:
HeapAllocator h_default = HeapAllocatorInit();
HeapAllocator h8 = HeapAllocatorInitAligned(8);
HeapAllocator h16 = HeapAllocatorInitAligned(16);
HeapAllocator h32 = HeapAllocatorInitAligned(32);
HeapAllocator h64 = HeapAllocatorInitAligned(64);- In
Vec.Init.c:165:
HeapAllocator h8 = HeapAllocatorInitAligned(8);
HeapAllocator h16 = HeapAllocatorInitAligned(16);
HeapAllocator h32 = HeapAllocatorInitAligned(32);
HeapAllocator h64 = HeapAllocatorInitAligned(64);- In
Vec.Init.c:166:
HeapAllocator h16 = HeapAllocatorInitAligned(16);
HeapAllocator h32 = HeapAllocatorInitAligned(32);
HeapAllocator h64 = HeapAllocatorInitAligned(64);
h_default.base.retry_limit = 17;- In
Vec.Access.c:172:
DefaultAllocator alloc = DefaultAllocatorInit();
HeapAllocator aligned8 = HeapAllocatorInitAligned(8);
// Create a vector of integers
- In
Vec.Access.c:227:
DefaultAllocator alloc = DefaultAllocatorInit();
HeapAllocator aligned8 = HeapAllocatorInitAligned(8);
// Create a vector of integers with default alignment (1)
- In
Graph.Init.c:124:
alloc.base.retry_limit = 31;
HeapAllocator aligned_8 = HeapAllocatorInitAligned(8);
aligned_8.base.retry_limit = 31;
HeapAllocator aligned_16 = HeapAllocatorInitAligned(16);- In
Graph.Init.c:126:
HeapAllocator aligned_8 = HeapAllocatorInitAligned(8);
aligned_8.base.retry_limit = 31;
HeapAllocator aligned_16 = HeapAllocatorInitAligned(16);
aligned_16.base.retry_limit = 31;
HeapAllocator aligned_32 = HeapAllocatorInitAligned(32);- In
Graph.Init.c:128:
HeapAllocator aligned_16 = HeapAllocatorInitAligned(16);
aligned_16.base.retry_limit = 31;
HeapAllocator aligned_32 = HeapAllocatorInitAligned(32);
aligned_32.base.retry_limit = 31;
HeapAllocator aligned_64 = HeapAllocatorInitAligned(64);- In
Graph.Init.c:130:
HeapAllocator aligned_32 = HeapAllocatorInitAligned(32);
aligned_32.base.retry_limit = 31;
HeapAllocator aligned_64 = HeapAllocatorInitAligned(64);
aligned_64.base.retry_limit = 31;- In
Graph.Type.c:32:
WriteFmt("Testing Graph aligned init and node id layout\n");
HeapAllocator alloc = HeapAllocatorInitAligned(32);
typedef Graph(int) IntGraph;
Last updated on