Home
last modified time | relevance | path

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

12

/illumos-gate/usr/src/uts/common/os/
H A Daudit_memory.c66 int i, alloc_size, oldlen; in au_pathdup() local
72 alloc_size = sizeof (struct audit_path) + in au_pathdup()
76 newapp = kmem_alloc(alloc_size, KM_SLEEP); in au_pathdup()
78 newapp->audp_size = alloc_size; in au_pathdup()
/illumos-gate/usr/src/lib/libmtmalloc/common/
H A Dmtmalloc.c462 size_t alloc_size; in memalign() local
477 alloc_size = size + alignment - MTMALLOC_MIN_ALIGN; in memalign()
479 if (alloc_size < size) { /* overflow */ in memalign()
484 alloc_buf = malloc(alloc_size); in memalign()
496 if ((alloc_size > MAX_CACHED) && in memalign()
497 (alloc_size & (MTMALLOC_MIN_ALIGN - 1))) in memalign()
498 alloc_size = ALIGN(alloc_size, MTMALLOC_MIN_ALIGN); in memalign()
503 size_t frag_size = alloc_size - in memalign()
510 if (IS_OVERSIZE(frag_size, alloc_size)) { in memalign()
541 if (alloc_size <= MAX_CACHED) { in memalign()
[all …]
/illumos-gate/usr/src/psm/stand/cpr/sparcv9/sun4u/
H A Dbitmap.c270 size_t bmda_size, all_bitmap_size, alloc_size; in cb_set_bitmap() local
311 alloc_size = PAGE_ROUNDUP(all_bitmap_size); in cb_set_bitmap()
316 str, all_bitmap_size, alloc_size); in cb_set_bitmap()
319 newvirt = map_free_phys(high_virt, alloc_size, "bitmaps"); in cb_set_bitmap()
330 if (alloc_size > all_bitmap_size) in cb_set_bitmap()
331 bzero(dst + all_bitmap_size, alloc_size - all_bitmap_size); in cb_set_bitmap()
339 high_virt += alloc_size; in cb_set_bitmap()
/illumos-gate/usr/src/uts/common/fs/smbsrv/
H A Dsmb_open_andx.c332 uint32_t alloc_size; in smb_pre_open_andx() local
341 &file_attr, &creation_time, &op->ofun, &alloc_size, &op->timeo); in smb_pre_open_andx()
347 op->dsize = alloc_size; in smb_pre_open_andx()
509 uint32_t alloc_size; in smb_com_trans2_open2() local
520 &creation_time, &op->ofun, &alloc_size, &op->fqi.fq_path.pn_path); in smb_com_trans2_open2()
547 op->dsize = alloc_size; in smb_com_trans2_open2()
/illumos-gate/usr/src/uts/sparc/os/
H A Dbootops.c518 uint32_t arbase, arsize, alloc_size; in bop_free_archive() local
529 prom_getprop(arph, OBP_ALLOCSIZE, (caddr_t)&alloc_size) == -1 || in bop_free_archive()
537 if (alloc_size == 0) in bop_free_archive()
544 MIN(alloc_size, arend - arbase)); in bop_free_archive()
545 arbase += alloc_size; in bop_free_archive()
/illumos-gate/usr/src/uts/common/c2/
H A Daudit_io.c597 size_t alloc_size; in au_doormsg() local
601 alloc_size = AU_DBUF_HEADER + sizeof (uint32_t); in au_doormsg()
602 buf = kmem_alloc(alloc_size, KM_SLEEP); in au_doormsg()
607 alloc_size = AU_DBUF_HEADER; in au_doormsg()
608 buf = kmem_alloc(alloc_size, KM_SLEEP); in au_doormsg()
617 kmem_free(buf, alloc_size); in au_doormsg()
/illumos-gate/usr/src/lib/libmalloc/common/
H A Dmalloc.c202 size_t alloc_size; in memalign() local
213 alloc_size = size + alignment; in memalign()
214 if (alloc_size < size) { /* overflow */ in memalign()
219 alloc_buf = malloc_unlocked(alloc_size, 1); in memalign()
239 alloc_size = size + alignment*2; in memalign()
240 if (alloc_size < size) { in memalign()
245 alloc_buf = malloc_unlocked(alloc_size, 1); in memalign()
/illumos-gate/usr/src/uts/common/io/fcoe/
H A Dfcoe_fc.c280 uint32_t alloc_size; in fcoe_allocate_frame() local
300 alloc_size = sizeof (fcoe_frame_t) + sizeof (fcoe_i_frame_t) + in fcoe_allocate_frame()
306 frm = (fcoe_frame_t *)kmem_alloc(alloc_size, KM_SLEEP); in fcoe_allocate_frame()
307 frm->frm_alloc_size = alloc_size; in fcoe_allocate_frame()
/illumos-gate/usr/src/common/smbclnt/
H A Dsmbfs_ntacl.c197 uint16_t alloc_size; in md_get_ace() local
220 alloc_size = sizeof (i_ntace_v2_t); in md_get_ace()
221 if ((ace = MALLOC(alloc_size)) == NULL) in md_get_ace()
223 bzero(ace, alloc_size); in md_get_ace()
227 ace->ace_hdr.ace_size = alloc_size; in md_get_ace()
1351 uint16_t alloc_size; in zace2ntace() local
1385 alloc_size = sizeof (i_ntace_v2_t); in zace2ntace()
1386 if ((ntace = MALLOC(alloc_size)) == NULL) { in zace2ntace()
1390 bzero(ntace, alloc_size); in zace2ntace()
1394 ntace->ace_hdr.ace_size = alloc_size; in zace2ntace()
/illumos-gate/usr/src/uts/i86pc/os/cpupm/
H A Dcpu_acpi.c686 size_t alloc_size; in cpu_acpi_cache_cst() local
740 alloc_size = CPU_ACPI_CSTATES_SIZE(cnt); in cpu_acpi_cache_cst()
742 CPU_ACPI_CSTATES(handle) = kmem_zalloc(alloc_size, KM_SLEEP); in cpu_acpi_cache_cst()
794 kmem_free(CPU_ACPI_CSTATES(handle), alloc_size); in cpu_acpi_cache_cst()
803 kmem_free(CPU_ACPI_CSTATES(handle), alloc_size); in cpu_acpi_cache_cst()
817 kmem_free(orig, alloc_size); in cpu_acpi_cache_cst()
/illumos-gate/usr/src/uts/common/io/hxge/
H A Dhxge_pfc.c1004 int alloc_size; in hxge_classify_init_sw() local
1019 alloc_size = sizeof (tcam_flow_spec_t) * classify_ptr->tcam_size; in hxge_classify_init_sw()
1020 classify_ptr->tcam_entries = KMEM_ZALLOC(alloc_size, KM_SLEEP); in hxge_classify_init_sw()
1035 int alloc_size; in hxge_classify_exit_sw() local
1044 alloc_size = fsize * classify_ptr->tcam_size; in hxge_classify_exit_sw()
1045 KMEM_FREE((void *) classify_ptr->tcam_entries, alloc_size); in hxge_classify_exit_sw()
H A Dhxge_ndd.c387 int i, alloc_size; in hxge_init_param() local
407 alloc_size = alloc_count * sizeof (uint64_t); in hxge_init_param()
409 (uint64_t)KMEM_ZALLOC(alloc_size, KM_SLEEP); in hxge_init_param()
411 (uint64_t)KMEM_ZALLOC(alloc_size, KM_SLEEP); in hxge_init_param()
/illumos-gate/usr/src/uts/common/sys/
H A Dkmem.h62 extern void *kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags);
/illumos-gate/usr/src/uts/common/io/bnxe/577xx/drivers/common/lm/device/
H A Dbnxe_context.c58 u32_t alloc_size = 0 ; in lm_setup_searcher_hash_info() local
80 alloc_size = sizeof(lm_searcher_hash_entry_t) * num_con; in lm_setup_searcher_hash_info()
81 mm_mem_zero(hash_info->searcher_table, alloc_size); in lm_setup_searcher_hash_info()
134 u32_t alloc_size = 0 ; in lm_alloc_searcher_hash_info() local
147 alloc_size = sizeof(lm_searcher_hash_entry_t) * num_con; in lm_alloc_searcher_hash_info()
157 hash_info->searcher_table = mm_alloc_mem(pdev, alloc_size, mm_cli_idx); in lm_alloc_searcher_hash_info()
H A Dlm_resc.c1717 u32_t alloc_size = 0 ; in lm_common_setup_alloc_resc() local
1898 alloc_size = (log2_align(max(params->max_func_connections,(u32_t)1000))*64); in lm_common_setup_alloc_resc()
1899 …alloc_num = vars->searcher_t1_num_pages = max((alloc_size / params->ilt_client_page_size),(u32_t)1… in lm_common_setup_alloc_resc()
1950 alloc_size = (params->max_func_connections + 4)*64; in lm_common_setup_alloc_resc()
1951 alloc_num = vars->searcher_t2_num_pages = alloc_size / params->ilt_client_page_size + in lm_common_setup_alloc_resc()
1952 ((alloc_size % params->ilt_client_page_size)? 1:0) ; in lm_common_setup_alloc_resc()
1998 alloc_size = ( 8 * pdev->hw_info.max_port_conns); in lm_common_setup_alloc_resc()
1999 alloc_num = vars->timers_linear_num_pages = alloc_size / params->ilt_client_page_size + in lm_common_setup_alloc_resc()
2000 ((alloc_size % params->ilt_client_page_size)? 1:0) ; in lm_common_setup_alloc_resc()
2051 alloc_size = ( 128 * pdev->hw_info.max_common_conns); in lm_common_setup_alloc_resc()
[all …]
H A Dlm_pf.c204 u32_t alloc_size = 0; in lm_pf_allocate_vfs() local
222 alloc_size = sizeof(lm_vf_info_t) * num_vfs; in lm_pf_allocate_vfs()
224 pdev->vfs_set.vfs_array = mm_alloc_mem(pdev, alloc_size, mm_cli_idx); in lm_pf_allocate_vfs()
230 mm_mem_zero(pdev->vfs_set.vfs_array, alloc_size ) ; in lm_pf_allocate_vfs()
250 alloc_size = sizeof(lm_stats_fw_t) * num_vfs; in lm_pf_allocate_vfs()
251 pdev->vfs_set.mirror_stats_fw_set = mm_alloc_mem(pdev, alloc_size, mm_cli_idx); in lm_pf_allocate_vfs()
H A Dlm_stats.c849 u32_t alloc_size = 0 ; in lm_stats_alloc_hw_query() local
860 alloc_size = mac_stats_alloc_size + sizeof( struct _stats_nig_query_t ) ; in lm_stats_alloc_hw_query()
861 …stats_hw->u.s.addr_emac_stats_query = mm_alloc_phys_mem(pdev, alloc_size, &phys_addr ,PHYS_MEM_TYP… in lm_stats_alloc_hw_query()
869 …FORM, "lm_stats_alloc_hw_query: allocated a block of size %d at %x\n", alloc_size, stats_hw->u.s.a… in lm_stats_alloc_hw_query()
886 alloc_size = mac_stats_alloc_size + sizeof( struct _stats_nig_query_t ); in lm_stats_alloc_hw_query()
888 …stats_hw->u.addr_mstat_stats_query = mm_alloc_phys_mem(pdev, alloc_size, &phys_addr ,PHYS_MEM_TYPE… in lm_stats_alloc_hw_query()
894 …FORM, "lm_stats_alloc_hw_query: allocated a block of size %d at %x\n", alloc_size, stats_hw->u.add… in lm_stats_alloc_hw_query()
912 u32_t alloc_size = 0; in lm_stats_alloc_fw_resc() local
954 alloc_size = stats_fw->fw_stats_data_sz + stats_fw->fw_stats_req_sz; in lm_stats_alloc_fw_resc()
955 …stats_fw->fw_stats = mm_alloc_phys_mem(pdev, alloc_size, &stats_fw->fw_stats_mapping ,PHYS_MEM_TYP… in lm_stats_alloc_fw_resc()
[all …]
/illumos-gate/usr/src/lib/libsasl/plugin/
H A Dplugin_common.c615 int alloc_size; local
629 alloc_size = sizeof(sasl_interact_t)*num;
630 prompts = utils->malloc(alloc_size);
635 memset(prompts, 0, alloc_size);
/illumos-gate/usr/src/uts/common/fs/tmpfs/
H A Dtmp_dir.c967 size_t namelen, alloc_size; in tdiraddentry() local
987 alloc_size = namelen + sizeof (struct tdirent); in tdiraddentry()
988 tdp = tmp_memalloc(alloc_size, 0); in tdiraddentry()
995 dir->tn_size += alloc_size; in tdiraddentry()
/illumos-gate/usr/src/uts/common/crypto/core/
H A Dkcf_cryptoadm.c197 uint_t alloc_size; in kcf_soft_config_init() local
202 alloc_size = mech_count * CRYPTO_MAX_MECH_NAME; in kcf_soft_config_init()
203 mechsp = kmem_alloc(alloc_size, KM_SLEEP); in kcf_soft_config_init()
204 bcopy(p->mechs, mechsp, alloc_size); in kcf_soft_config_init()
/illumos-gate/usr/src/uts/sun4/os/
H A Dstartup.c786 size_t alloc_size, alignsize; in alloc_kmem64() local
801 alloc_size = aligned_end - base; in alloc_kmem64()
803 if (prom_allocate_phys(alloc_size, alignsize, &pa) == 0) { in alloc_kmem64()
804 if (prom_claim_virt(alloc_size, base) != (caddr_t)-1) { in alloc_kmem64()
810 prom_free_phys(alloc_size, pa); in alloc_kmem64()
814 if (prom_alloc(base, alloc_size, alignsize) == base) { in alloc_kmem64()
/illumos-gate/usr/src/uts/common/fs/dev/
H A Dsdev_zvolops.c136 devzvol_handle_ioctl(int cmd, zfs_cmd_t *zc, size_t *alloc_size) in devzvol_handle_ioctl() argument
170 if (alloc_size == NULL) in devzvol_handle_ioctl()
173 *alloc_size = size; in devzvol_handle_ioctl()
/illumos-gate/usr/src/uts/common/io/comstar/stmf/
H A Dlun_map.c249 uint32_t alloc_size, data_size; in stmf_session_prepare_report_lun_data() local
259 alloc_size = data_size + sizeof (stmf_xfer_data_t) - 4; in stmf_session_prepare_report_lun_data()
261 xd = (stmf_xfer_data_t *)kmem_zalloc(alloc_size, KM_NOSLEEP); in stmf_session_prepare_report_lun_data()
266 xd->alloc_size = alloc_size; in stmf_session_prepare_report_lun_data()
H A Dstmf_impl.h420 uint32_t alloc_size; /* Including this struct */ member
/illumos-gate/usr/src/tools/smatch/src/
H A Dgcc-attr-list.h10 GCC_ATTR(alloc_size)

12