Lines Matching refs:bin

93 		uint16			allocation_id; // used for bin == bin_count allocations
161 8, /* min bin size */
162 4, /* bin alignment */
171 B_PAGE_SIZE / 8, /* min bin size */
172 32, /* bin alignment */
181 B_PAGE_SIZE * 2, /* min bin size */
182 128, /* bin alignment */
323 dump_bin(heap_bin *bin)
326 for (heap_page *page = bin->page_list; page != NULL; page = page->next)
330 "(%" B_PRIu32 " pages);\n", bin->element_size, bin->max_free_count,
331 bin->page_list, count);
333 for (heap_page *page = bin->page_list; page != NULL; page = page->next)
468 // page is used by a small allocation bin
576 // page is used by a small allocation bin
713 // page is used by a small allocation bin
935 heap_bin *bin = &heap->bins[i];
937 heap_page *page = bin->page_list;
964 panic("used page entry has invalid prev link (%p vs %p bin "
972 panic("used page with bin index %u in page list of bin %lu\n",
977 panic("ordering of bin page list broken\n");
988 if (((addr_t)element - pageBase) % bin->element_size != 0)
995 uint32 slotCount = bin->max_free_count;
1188 panic("heap configuration invalid - max bin count reached\n");
1196 heap_bin *bin = &heap->bins[heap->bin_count];
1197 mutex_init(&bin->lock, "heap bin lock");
1198 bin->element_size = binSize;
1199 bin->max_free_count = heap->page_size / binSize;
1200 bin->page_list = NULL;
1438 heap_bin *bin = &heap->bins[binIndex];
1439 TRACE(("heap %p: allocate %lu bytes from bin %lu with element_size %lu\n",
1440 heap, size, binIndex, bin->element_size));
1442 MutexLocker binLocker(bin->lock);
1443 heap_page *page = bin->page_list;
1469 page->free_count = bin->max_free_count;
1473 bin->page_list = page;
1485 + page->empty_index * bin->element_size);
1492 bin->page_list = page->next;
1500 heap_add_leak_check_info(heap, (addr_t)address, bin->element_size, size);
1540 // of the target bin is aligned with the requested alignment. This
1542 // bin could possibly be selected. We should pick the best bin and
1638 heap_bin *bin = &heap->bins[page->bin_index];
1644 MutexLocker binLocker(bin->lock);
1658 for (uint32 i = 1; i < bin->element_size / sizeof(uint32); i++)
1662 MutexLocker binLocker(bin->lock);
1664 * heap->page_size) % bin->element_size != 0) {
1665 panic("free(): passed invalid pointer %p supposed to be in bin for "
1666 "element size %" B_PRIu32 "\n", address, bin->element_size);
1675 if (page->free_count == bin->max_free_count) {
1676 // we are now empty, remove the page from the bin list
1678 heap_unlink_page(page, &bin->page_list);
1683 // we need to add ourselfs to the page list of the bin
1684 heap_link_page(page, &bin->page_list);
1694 heap_unlink_page(page, &bin->page_list);
1819 heap_bin *bin = &heap->bins[page->bin_index];
1820 maxSize = bin->element_size;
2114 8, /* min bin size */
2115 4, /* bin alignment */