| /freebsd-12.1/sys/dev/ixl/ |
| H A D | ixl_pf_qmgr.c | 61 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-12.1/sys/compat/linuxkpi/common/include/linux/ |
| H A D | scatterlist.h | 205 if (alloc_size > max_ents) { in __sg_free_table() 207 alloc_size = max_ents; in __sg_free_table() 208 sg_size = alloc_size - 1; in __sg_free_table() 210 sg_size = alloc_size; in __sg_free_table() 218 free_fn(sgl, alloc_size); in __sg_free_table() 247 unsigned int alloc_size = left; in __sg_alloc_table() local 249 if (alloc_size > max_ents) { in __sg_alloc_table() 250 alloc_size = max_ents; in __sg_alloc_table() 251 sg_size = alloc_size - 1; in __sg_alloc_table() 253 sg_size = alloc_size; in __sg_alloc_table() [all …]
|
| /freebsd-12.1/sys/dev/smartpqi/ |
| H A D | smartpqi_queue.c | 149 uint32_t alloc_size = 0; in pqisrc_allocate_and_init_adminq() local 675 uint32_t alloc_size = 0; in pqisrc_alloc_and_create_event_queue() local 757 uint32_t alloc_size = 0; in pqisrc_alloc_and_create_ib_queues() local 774 alloc_size = num_op_ibq * ibq_size; in pqisrc_alloc_and_create_ib_queues() 776 ib_ci_dma_start_offset = alloc_size; in pqisrc_alloc_and_create_ib_queues() 777 ib_ci_virt_start_offset = alloc_size; in pqisrc_alloc_and_create_ib_queues() 782 softs->op_ibq_dma_mem.size = alloc_size; in pqisrc_alloc_and_create_ib_queues() 879 uint32_t alloc_size = 0; in pqisrc_alloc_and_create_ob_queues() local 902 alloc_size += num_op_obq * obq_size; in pqisrc_alloc_and_create_ob_queues() 904 ob_pi_dma_start_offset = alloc_size; in pqisrc_alloc_and_create_ob_queues() [all …]
|
| H A D | smartpqi_event.c | 329 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() 389 uint32_t alloc_size = sizeof(pqi_event_config_t); in pqisrc_set_event_config() local 396 buf_set_event.size = alloc_size; in pqisrc_set_event_config()
|
| H A D | smartpqi_init.c | 160 uint64_t alloc_size = 0; in pqisrc_allocate_rcb() local 174 alloc_size = num_req * sizeof(rcb_t); in pqisrc_allocate_rcb() 177 rcb = os_mem_alloc(softs, alloc_size); in pqisrc_allocate_rcb()
|
| /freebsd-12.1/lib/libc/tests/string/ |
| H A D | wcsnlen_test.c | 44 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 D | stpncpy_test.c | 43 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-12.1/sys/dev/usb/ |
| H A D | usb_mbuf.c | 71 usb_size_t alloc_size; in usb_alloc_mbufs() local 78 alloc_size = (block_size + sizeof(struct usb_mbuf)) * nblocks; in usb_alloc_mbufs() 80 free_ptr = malloc(alloc_size, type, M_WAITOK | M_ZERO); in usb_alloc_mbufs()
|
| /freebsd-12.1/contrib/jemalloc/src/ |
| H A D | pages.c | 99 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()
|
| H A D | extent.c | 1244 size_t alloc_size = sz_pind2sz(arena->extent_grow_next + egn_skip); in extent_grow_retained() local 1245 while (alloc_size < alloc_size_min) { in extent_grow_retained() 1252 alloc_size = sz_pind2sz(arena->extent_grow_next + egn_skip); in extent_grow_retained() 1265 alloc_size, PAGE, &zeroed, &committed); in extent_grow_retained() 1269 alloc_size, PAGE, &zeroed, &committed, in extent_grow_retained() 1274 extent_init(extent, arena, ptr, alloc_size, false, NSIZES, in extent_grow_retained()
|
| /freebsd-12.1/sys/contrib/octeon-sdk/ |
| H A D | octeon-pci-console.c | 455 …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-12.1/contrib/gcclibs/libiberty/ |
| H A D | xmemdup.c | 34 xmemdup (const PTR input, size_t copy_size, size_t alloc_size) in xmemdup() argument 36 PTR output = xcalloc (1, alloc_size); in xmemdup()
|
| /freebsd-12.1/contrib/binutils/libiberty/ |
| H A D | xmemdup.c | 34 xmemdup (const PTR input, size_t copy_size, size_t alloc_size) in xmemdup() argument 36 PTR output = xcalloc (1, alloc_size); in xmemdup()
|
| /freebsd-12.1/sys/dev/drm2/ttm/ |
| H A D | ttm_page_alloc.c | 85 unsigned alloc_size; member 248 m->options.alloc_size = val; 264 val = m->options.alloc_size; 622 unsigned alloc_size = _manager->options.alloc_size; in ttm_page_pool_fill_locked() local 632 ttm_flags, cstate, alloc_size); in ttm_page_pool_fill_locked() 638 pool->npages += alloc_size; in ttm_page_pool_fill_locked() 826 _manager->options.alloc_size = NUM_PAGES_TO_ALLOC; in ttm_page_alloc_init()
|
| H A D | ttm_page_alloc_dma.c | 144 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-12.1/contrib/apr/include/ |
| H A D | apr_strings.h | 111 __attribute__((alloc_size(3))) 137 __attribute__((alloc_size(3)))
|
| H A D | apr_pools.h | 432 __attribute__((alloc_size(2))) 447 __attribute__((alloc_size(2)))
|
| /freebsd-12.1/contrib/ofed/opensm/complib/ |
| H A D | cl_vector.c | 337 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-12.1/contrib/gcc/ |
| H A D | ggc-zone.c | 2147 size_t alloc_size; member 2203 size_t alloc_size, total_size; in ggc_pch_total_size() local 2214 alloc_size = CEIL (d->d.total, BYTES_PER_ALLOC_BIT * 8); in ggc_pch_total_size() 2215 alloc_size = ROUND_UP (alloc_size, MAX_ALIGNMENT); in ggc_pch_total_size() 2216 d->alloc_size = alloc_size; in ggc_pch_total_size() 2218 return d->d.total + alloc_size; in ggc_pch_total_size() 2237 d->alloc_bits = xcalloc (1, d->alloc_size); in ggc_pch_this_base() 2301 if (fwrite (d->alloc_bits, d->alloc_size, 1, f) != 1) in ggc_pch_finish() 2319 size_t alloc_size; in ggc_pch_read() local 2327 alloc_size = CEIL (d.total, BYTES_PER_ALLOC_BIT * 8); in ggc_pch_read() [all …]
|
| H A D | ggc-page.c | 315 size_t alloc_size; member 808 size_t alloc_size, head_slop, tail_slop; in alloc_page() local 812 alloc_size = GGC_QUIRE_SIZE * G.pagesize; in alloc_page() 814 alloc_size = entry_size + G.pagesize - 1; in alloc_page() 815 allocation = xmalloc (alloc_size); in alloc_page() 820 tail_slop = ((size_t) allocation + alloc_size) & (G.pagesize - 1); in alloc_page() 822 tail_slop = alloc_size - entry_size - head_slop; in alloc_page() 823 enda = allocation + alloc_size - tail_slop; in alloc_page() 847 group->alloc_size = alloc_size; in alloc_page() 850 G.bytes_mapped += alloc_size; in alloc_page() [all …]
|
| /freebsd-12.1/sys/geom/ |
| H A D | geom_dev.c | 658 size_t alloc_size; in g_dev_ioctl() local 663 alloc_size = 0; in g_dev_ioctl() 670 alloc_size = rep->entries_allocated * in g_dev_ioctl() 672 if (alloc_size != 0) in g_dev_ioctl() 673 new_entries = g_malloc(alloc_size, in g_dev_ioctl() 680 alloc_size != 0 && error == 0) in g_dev_ioctl() 681 error = copyout(new_entries, old_entries, alloc_size); in g_dev_ioctl()
|
| /freebsd-12.1/contrib/llvm/tools/lldb/source/Expression/ |
| H A D | IRMemoryMap.cpp | 91 size_t alloc_size = back->second.m_size; in FindSpace() local 92 ret = llvm::alignTo(addr + alloc_size, 4096); in FindSpace() 158 size_t alloc_size = back->second.m_size; in FindSpace() local 159 ret = llvm::alignTo(addr + alloc_size, 4096); in FindSpace()
|
| /freebsd-12.1/contrib/jemalloc/include/jemalloc/ |
| H A D | jemalloc.h | 172 # define JEMALLOC_ALLOC_SIZE(s) JEMALLOC_ATTR(alloc_size(s)) 173 # define JEMALLOC_ALLOC_SIZE2(s1, s2) JEMALLOC_ATTR(alloc_size(s1, s2))
|
| /freebsd-12.1/contrib/openmp/runtime/src/ |
| H A D | kmp_alloc.cpp | 1564 size_t alloc_size; in ___kmp_fast_allocate() local 1623 alloc_size = size + sizeof(kmp_mem_descr_t) + DCACHE_LINE; in ___kmp_fast_allocate() 1626 __kmp_gtid_from_thread(this_thr), alloc_size)); in ___kmp_fast_allocate() 1627 alloc_ptr = bget(this_thr, (bufsize)alloc_size); in ___kmp_fast_allocate()
|
| /freebsd-12.1/sys/cddl/contrib/opensolaris/common/nvpair/ |
| H A D | opensolaris_nvpair.c | 2659 size_t alloc_size; in nvlist_xpack() local 2684 if ((err = nvlist_size(nvl, &alloc_size, encoding))) in nvlist_xpack() 2687 if ((buf = nv_mem_zalloc(&nvpriv, alloc_size)) == NULL) in nvlist_xpack() 2690 if ((err = nvlist_common(nvl, buf, &alloc_size, encoding, in nvlist_xpack() 2692 nv_mem_free(&nvpriv, buf, alloc_size); in nvlist_xpack() 2694 *buflen = alloc_size; in nvlist_xpack()
|