Home
last modified time | relevance | path

Searched refs:alloc_size (Results 1 – 25 of 43) sorted by relevance

12

/freebsd-13.1/sys/dev/ixl/
H A Dixl_pf_qmgr.c61 u16 alloc_size; in ixl_pf_qmgr_alloc_contiguous() local
67 alloc_size = (u16)next_power_of_two(num); in ixl_pf_qmgr_alloc_contiguous()
71 if (avail < alloc_size) in ixl_pf_qmgr_alloc_contiguous()
74 block_start = ixl_pf_qmgr_find_free_contiguous_block(qmgr, alloc_size); in ixl_pf_qmgr_alloc_contiguous()
79 for (i = block_start; i < block_start + alloc_size; i++) in ixl_pf_qmgr_alloc_contiguous()
86 qtag->num_allocated = alloc_size; in ixl_pf_qmgr_alloc_contiguous()
100 u16 alloc_size; in ixl_pf_qmgr_alloc_scattered() local
106 alloc_size = (u16)next_power_of_two(num); in ixl_pf_qmgr_alloc_scattered()
109 if (avail < alloc_size) in ixl_pf_qmgr_alloc_scattered()
116 qtag->num_allocated = alloc_size; in ixl_pf_qmgr_alloc_scattered()
[all …]
/freebsd-13.1/sys/net/route/
H A Dnhgrp.c217 size_t alloc_size; in consider_resize() local
221 alloc_size = CHT_SLIST_GET_RESIZE_SIZE(new_gr_bucket); in consider_resize()
222 gr_ptr = malloc(alloc_size, M_NHOP, M_NOWAIT | M_ZERO); in consider_resize()
227 alloc_size = bitmask_get_size(new_idx_items); in consider_resize()
228 gr_idx_ptr = malloc(alloc_size, M_NHOP, M_NOWAIT | M_ZERO); in consider_resize()
263 size_t alloc_size; in nhgrp_ctl_alloc_default() local
270 alloc_size = CHT_SLIST_GET_RESIZE_SIZE(num_buckets); in nhgrp_ctl_alloc_default()
271 cht_ptr = malloc(alloc_size, M_NHOP, malloc_flags); in nhgrp_ctl_alloc_default()
H A Dnhop.c75 size_t alloc_size; in nhops_init_rib() local
86 alloc_size = CHT_SLIST_GET_RESIZE_SIZE(num_buckets); in nhops_init_rib()
87 ptr = malloc(alloc_size, M_NHOP, M_WAITOK | M_ZERO); in nhops_init_rib()
241 size_t alloc_size; in consider_resize() local
245 alloc_size = CHT_SLIST_GET_RESIZE_SIZE(new_nh_buckets); in consider_resize()
246 nh_ptr = malloc(alloc_size, M_NHOP, M_NOWAIT | M_ZERO); in consider_resize()
251 alloc_size = bitmask_get_size(new_idx_items); in consider_resize()
252 nh_idx_ptr = malloc(alloc_size, M_NHOP, M_NOWAIT | M_ZERO); in consider_resize()
/freebsd-13.1/sys/compat/linuxkpi/common/include/linux/
H A Dscatterlist.h217 if (alloc_size > max_ents) { in __sg_free_table()
219 alloc_size = max_ents; in __sg_free_table()
220 sg_size = alloc_size - 1; in __sg_free_table()
222 sg_size = alloc_size; in __sg_free_table()
230 free_fn(sgl, alloc_size); in __sg_free_table()
259 unsigned int alloc_size = left; in __sg_alloc_table() local
261 if (alloc_size > max_ents) { in __sg_alloc_table()
262 alloc_size = max_ents; in __sg_alloc_table()
263 sg_size = alloc_size - 1; in __sg_alloc_table()
265 sg_size = alloc_size; in __sg_alloc_table()
[all …]
/freebsd-13.1/sys/dev/smartpqi/
H A Dsmartpqi_queue.c153 uint32_t alloc_size = 0; in pqisrc_allocate_and_init_adminq() local
693 uint32_t alloc_size = 0; in pqisrc_alloc_and_create_event_queue() local
776 uint32_t alloc_size = 0; in pqisrc_alloc_and_create_ib_queues() local
793 alloc_size = num_op_ibq * ibq_size; in pqisrc_alloc_and_create_ib_queues()
795 ib_ci_dma_start_offset = alloc_size; in pqisrc_alloc_and_create_ib_queues()
796 ib_ci_virt_start_offset = alloc_size; in pqisrc_alloc_and_create_ib_queues()
801 softs->op_ibq_dma_mem.size = alloc_size; in pqisrc_alloc_and_create_ib_queues()
905 uint32_t alloc_size = 0; in pqisrc_alloc_and_create_ob_queues() local
928 alloc_size += num_op_obq * obq_size; in pqisrc_alloc_and_create_ob_queues()
930 ob_pi_dma_start_offset = alloc_size; in pqisrc_alloc_and_create_ob_queues()
[all …]
H A Dsmartpqi_event.c329 uint32_t alloc_size = sizeof(pqi_event_config_t) ; in pqisrc_report_event_config() local
336 buf_report_event.size = alloc_size; in pqisrc_report_event_config()
390 uint32_t alloc_size = sizeof(pqi_event_config_t); in pqisrc_set_event_config() local
397 buf_set_event.size = alloc_size; in pqisrc_set_event_config()
H A Dsmartpqi_init.c164 uint64_t alloc_size = 0; in pqisrc_allocate_rcb() local
178 alloc_size = num_req * sizeof(rcb_t); in pqisrc_allocate_rcb()
181 rcb = os_mem_alloc(softs, alloc_size); in pqisrc_allocate_rcb()
/freebsd-13.1/lib/libc/tests/string/
H A Dwcsnlen_test.c44 size_t alloc_size = roundup2(len, PAGE_SIZE) + PAGE_SIZE; in makebuf() local
46 buf = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); in makebuf()
49 ATF_CHECK(munmap(buf + alloc_size - PAGE_SIZE, PAGE_SIZE) == 0); in makebuf()
50 return (buf + alloc_size - PAGE_SIZE - len); in makebuf()
H A Dstpncpy_test.c43 size_t alloc_size = roundup2(len, PAGE_SIZE) + PAGE_SIZE; in makebuf() local
45 buf = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); in makebuf()
48 assert(munmap(buf + alloc_size - PAGE_SIZE, PAGE_SIZE) == 0); in makebuf()
49 return (buf + alloc_size - PAGE_SIZE - len); in makebuf()
/freebsd-13.1/sys/dev/usb/
H A Dusb_mbuf.c71 usb_size_t alloc_size; in usb_alloc_mbufs() local
77 alloc_size = (block_size + sizeof(struct usb_mbuf)) * nblocks; in usb_alloc_mbufs()
79 free_ptr = malloc(alloc_size, type, M_WAITOK | M_ZERO); in usb_alloc_mbufs()
/freebsd-13.1/contrib/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_fuchsia.cpp68 uptr alloc_size = UINT64_C(1) << kShadowBaseAlignment; in InitThreads() local
70 MmapAlignedOrDieOnFatalError(alloc_size, alloc_size, __func__)); in InitThreads()
72 InitThreadList(thread_start, alloc_size); in InitThreads()
/freebsd-13.1/contrib/jemalloc/src/
H A Dpages.c99 os_pages_trim(void *addr, size_t alloc_size, size_t leadsize, size_t size, in os_pages_trim() argument
103 assert(alloc_size >= leadsize + size); in os_pages_trim()
105 os_pages_unmap(addr, alloc_size); in os_pages_trim()
115 size_t trailsize = alloc_size - leadsize - size; in os_pages_trim()
156 size_t alloc_size = size + alignment - os_page; in pages_map_slow() local
158 if (alloc_size < size) { in pages_map_slow()
164 void *pages = os_pages_map(NULL, alloc_size, alignment, commit); in pages_map_slow()
170 ret = os_pages_trim(pages, alloc_size, leadsize, size, commit); in pages_map_slow()
/freebsd-13.1/sys/contrib/octeon-sdk/
H A Docteon-pci-console.c455 …int alloc_size = num_consoles * (buffer_size * 2 + sizeof(octeon_pci_console_t) + sizeof(uint64_t)… in octeon_pci_console_init() local
460 …console_block_addr = cvmx_bootmem_phy_named_block_alloc(alloc_size, OCTEON_DDR0_SIZE - alloc_size in octeon_pci_console_init()
462 …ck_addr = cvmx_bootmem_phy_named_block_alloc(alloc_size, OCTEON_DDR2_BASE + 1, OCTEON_DDR2_BASE + in octeon_pci_console_init()
464 …console_block_addr = cvmx_bootmem_phy_named_block_alloc(alloc_size, 0, 0x7fffffff, 128, OCTEON_PCI… in octeon_pci_console_init()
470 memset(cons_desc_ptr, 0, alloc_size); /* Clear entire alloc'ed memory */ in octeon_pci_console_init()
/freebsd-13.1/sys/dev/drm2/ttm/
H A Dttm_page_alloc.c86 unsigned alloc_size; member
244 m->options.alloc_size = val;
260 val = m->options.alloc_size;
618 unsigned alloc_size = _manager->options.alloc_size; in ttm_page_pool_fill_locked() local
628 ttm_flags, cstate, alloc_size); in ttm_page_pool_fill_locked()
634 pool->npages += alloc_size; in ttm_page_pool_fill_locked()
822 _manager->options.alloc_size = NUM_PAGES_TO_ALLOC; in ttm_page_alloc_init()
H A Dttm_page_alloc_dma.c144 unsigned alloc_size; member
237 m->options.alloc_size = val; in ttm_pool_store()
255 val = m->options.alloc_size; in ttm_pool_show()
1073 _manager->options.alloc_size = NUM_PAGES_TO_ALLOC; in ttm_dma_page_alloc_init()
/freebsd-13.1/contrib/apr/include/
H A Dapr_strings.h111 __attribute__((alloc_size(3)))
137 __attribute__((alloc_size(3)))
H A Dapr_pools.h432 __attribute__((alloc_size(2)))
447 __attribute__((alloc_size(2)))
/freebsd-13.1/contrib/ofed/opensm/complib/
H A Dcl_vector.c337 size_t alloc_size; in cl_vector_set_capacity() local
376 alloc_size = new_elements * p_vector->element_size; in cl_vector_set_capacity()
378 p_buf = (cl_list_item_t *) malloc(alloc_size + sizeof(cl_list_item_t)); in cl_vector_set_capacity()
382 memset(p_buf, 0, alloc_size + sizeof(cl_list_item_t)); in cl_vector_set_capacity()
/freebsd-13.1/sys/arm64/arm64/
H A Dbusdma_bounce.c75 size_t alloc_size; member
271 newtag->alloc_size = newtag->common.maxsize; in bounce_bus_dma_tag_create()
281 newtag->alloc_size = roundup2(newtag->common.maxsize, in bounce_bus_dma_tag_create()
590 if ((dmat->alloc_size <= PAGE_SIZE) && in bounce_bus_dmamem_alloc()
591 (dmat->alloc_alignment <= dmat->alloc_size) && in bounce_bus_dmamem_alloc()
594 *vaddr = malloc(dmat->alloc_size, M_DEVBUF, mflags); in bounce_bus_dmamem_alloc()
596 howmany(dmat->alloc_size, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && in bounce_bus_dmamem_alloc()
600 *vaddr = (void *)kmem_alloc_attr(dmat->alloc_size, mflags, in bounce_bus_dmamem_alloc()
604 *vaddr = (void *)kmem_alloc_contig(dmat->alloc_size, mflags, in bounce_bus_dmamem_alloc()
641 kmem_free((vm_offset_t)vaddr, dmat->alloc_size); in bounce_bus_dmamem_free()
/freebsd-13.1/sys/geom/
H A Dgeom_dev.c714 size_t alloc_size; in g_dev_ioctl() local
719 alloc_size = 0; in g_dev_ioctl()
726 alloc_size = rep->entries_allocated * in g_dev_ioctl()
728 if (alloc_size != 0) in g_dev_ioctl()
729 new_entries = g_malloc(alloc_size, in g_dev_ioctl()
736 alloc_size != 0 && error == 0) in g_dev_ioctl()
737 error = copyout(new_entries, old_entries, alloc_size); in g_dev_ioctl()
/freebsd-13.1/sys/vm/
H A Dvm_phys.c1635 vm_phys_early_alloc(int domain, size_t alloc_size) in vm_phys_early_alloc() argument
1678 if (phys_avail[i+1] - alloc_size < mem_start || in vm_phys_early_alloc()
1687 alloc_size = round_page(alloc_size); in vm_phys_early_alloc()
1692 if (alloc_size == PAGE_SIZE) { in vm_phys_early_alloc()
1702 align = phys_avail[biggestone + 1] & (alloc_size - 1); in vm_phys_early_alloc()
1703 if (alloc_size + align > biggestsize) in vm_phys_early_alloc()
1711 phys_avail[biggestone + 1] -= alloc_size; in vm_phys_early_alloc()
H A Dvm_phys.h86 vm_paddr_t vm_phys_early_alloc(int domain, size_t alloc_size);
/freebsd-13.1/contrib/llvm-project/lldb/source/Expression/
H A DIRMemoryMap.cpp90 size_t alloc_size = back->second.m_size; in FindSpace() local
91 ret = llvm::alignTo(addr + alloc_size, 4096); in FindSpace()
157 size_t alloc_size = back->second.m_size; in FindSpace() local
158 ret = llvm::alignTo(addr + alloc_size, 4096); in FindSpace()
/freebsd-13.1/contrib/jemalloc/include/jemalloc/
H A Djemalloc.h178 # define JEMALLOC_ALLOC_SIZE(s) JEMALLOC_ATTR(alloc_size(s))
179 # define JEMALLOC_ALLOC_SIZE2(s1, s2) JEMALLOC_ATTR(alloc_size(s1, s2))
/freebsd-13.1/sys/contrib/dev/iwlwifi/pcie/
H A Dtrans.c47 u32 i, pos, alloc_size, *ptr, *buf; in iwl_trans_pcie_dump_regs() local
59 alloc_size = PCI_ERR_ROOT_ERR_SRC + 4 + PREFIX_LEN; in iwl_trans_pcie_dump_regs()
60 alloc_size = max_t(u32, alloc_size, PCI_DUMP_SIZE + PREFIX_LEN); in iwl_trans_pcie_dump_regs()
61 alloc_size = max_t(u32, alloc_size, PCI_MEM_DUMP_SIZE + PREFIX_LEN); in iwl_trans_pcie_dump_regs()
62 alloc_size = max_t(u32, alloc_size, PCI_PARENT_DUMP_SIZE + PREFIX_LEN); in iwl_trans_pcie_dump_regs()
64 buf = kmalloc(alloc_size, GFP_ATOMIC); in iwl_trans_pcie_dump_regs()
67 prefix = (char *)buf + alloc_size - PREFIX_LEN; in iwl_trans_pcie_dump_regs()

12