Lines Matching defs:alignment

42 static void *debug_heap_memalign(size_t alignment, size_t size);
179 4, /* bin alignment */
189 32, /* bin alignment */
199 128, /* bin alignment */
944 size_t alignment)
957 if (alignment > heap->page_size) {
958 firstValid = (ROUNDUP(area->base, alignment) - area->base)
960 step = alignment / heap->page_size;
1022 heap_raw_alloc(heap_allocator *heap, size_t size, size_t alignment)
1025 " alignment %" B_PRIuSIZE "\n", heap, size, alignment));
1031 alignment);
1114 heap_memalign(heap_allocator *heap, size_t alignment, size_t size)
1116 INFO(("memalign(alignment = %" B_PRIuSIZE ", size = %" B_PRIuSIZE ")\n",
1117 alignment, size));
1119 if (!is_valid_alignment(alignment)) {
1120 panic("memalign() with an alignment which is not a power of 2 (%" B_PRIuSIZE ")\n",
1121 alignment);
1127 if (alignment < B_PAGE_SIZE) {
1128 if (alignment != 0) {
1129 // TODO: The alignment is done by ensuring that the element size
1130 // of the target bin is aligned with the requested alignment. This
1135 size = ROUNDUP(size, alignment);
1154 address = heap_raw_alloc(heap, size, alignment);
1837 debug_heap_memalign(size_t alignment, size_t size)
1840 if (alignment != 0 && alignment < B_PAGE_SIZE)
1841 alignedSize = ROUNDUP(alignedSize, alignment);
1846 + alignment, B_PAGE_SIZE);
1868 info->allocation_alignment = alignment;
1871 if (alignment != 0) {
1872 address = (void *)ROUNDUP((addr_t)address, alignment);
1873 ASSERT((addr_t)address % alignment == 0);
1886 uint32 heapClass = alignment < B_PAGE_SIZE
1890 void *result = heap_memalign(heap, alignment, size);
1894 result = heap_memalign(heap, alignment, size);
1905 if (alignment != 0)
1906 ASSERT((addr_t)result % alignment == 0);