Lines Matching refs:bin

118 		uint16			allocation_id; // used for bin == bin_count allocations
178 8, /* min bin size */
179 4, /* bin alignment */
188 B_PAGE_SIZE / 8, /* min bin size */
189 32, /* bin alignment */
198 B_PAGE_SIZE * 2, /* min bin size */
199 128, /* bin alignment */
226 dump_bin(heap_bin *bin)
229 bin->element_size, bin->max_free_count, bin->page_list);
231 for (heap_page *temp = bin->page_list; temp != NULL; temp = temp->next)
297 // page is used by a small allocation bin
392 // page is used by a small allocation bin
568 heap_bin *bin = &heap->bins[i];
570 heap_page *page = bin->page_list;
600 panic("used page entry has invalid prev link (%p vs %p bin "
608 panic("used page with bin index %" B_PRIu16 " in page list of bin %" B_PRIu32 "\n",
613 panic("ordering of bin page list broken\n");
624 if (((addr_t)element - pageBase) % bin->element_size != 0)
631 uint32 slotCount = bin->max_free_count;
801 panic("heap configuration invalid - max bin count reached\n");
809 heap_bin *bin = &heap->bins[heap->bin_count];
810 mutex_init(&bin->lock, "heap bin lock");
811 bin->element_size = binSize;
812 bin->max_free_count = heap->page_size / binSize;
813 bin->page_list = NULL;
1047 heap_bin *bin = &heap->bins[binIndex];
1048 INFO(("heap %p: allocate %" B_PRIuSIZE " bytes from bin %" B_PRIu32
1050 heap, size, binIndex, bin->element_size));
1052 MutexLocker binLocker(bin->lock);
1053 heap_page *page = bin->page_list;
1079 page->free_count = bin->max_free_count;
1083 bin->page_list = page;
1095 + page->empty_index * bin->element_size);
1102 bin->page_list = page->next;
1108 heap_add_leak_check_info((addr_t)address, bin->element_size, size);
1130 // of the target bin is aligned with the requested alignment. This
1132 // bin could possibly be selected. We should pick the best bin and
1223 heap_bin *bin = &heap->bins[page->bin_index];
1224 if (((addr_t)address - pageBase) % bin->element_size != 0) {
1227 (void *)pageBase, bin->element_size);
1231 MutexLocker binLocker(bin->lock);
1247 + bin->element_size - sizeof(heap_leak_check_info));
1248 if (info->size > bin->element_size - sizeof(addr_t)
1253 info->size, bin->element_size);
1269 for (uint32 i = 0; i < bin->element_size / sizeof(uint32); i++)
1278 if (page->free_count == bin->max_free_count) {
1279 // we are now empty, remove the page from the bin list
1281 heap_unlink_page(page, &bin->page_list);
1286 // we need to add ourselfs to the page list of the bin
1287 heap_link_page(page, &bin->page_list);
1297 heap_unlink_page(page, &bin->page_list);
1435 heap_bin *bin = &heap->bins[page->bin_index];
1436 maxSize = bin->element_size;
1550 heap_bin *bin = &heap->bins[page->bin_index];
1551 if (((addr_t)address - pageBase) % bin->element_size != 0) {
1554 address, (void *)pageBase, bin->element_size);
1558 MutexLocker binLocker(bin->lock);
1560 info = (heap_leak_check_info *)((addr_t)address + bin->element_size
1562 if (info->size > bin->element_size - sizeof(addr_t)
1567 info->size, bin->element_size);