Home
last modified time | relevance | path

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

12

/onnv-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()
/onnv-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()
/onnv-gate/usr/src/lib/libmtmalloc/common/
H A Dmtmalloc.c450 size_t alloc_size; in memalign() local
465 alloc_size = size + alignment - MTMALLOC_MIN_ALIGN; in memalign()
467 if (alloc_size < size) { /* overflow */ in memalign()
472 alloc_buf = malloc(alloc_size); in memalign()
484 if ((alloc_size > MAX_CACHED) && in memalign()
485 (alloc_size & (MTMALLOC_MIN_ALIGN - 1))) in memalign()
486 alloc_size = ALIGN(alloc_size, MTMALLOC_MIN_ALIGN); in memalign()
491 size_t frag_size = alloc_size - in memalign()
498 if (IS_OVERSIZE(frag_size, alloc_size)) { in memalign()
529 if (alloc_size <= MAX_CACHED) { in memalign()
[all …]
/onnv-gate/usr/src/uts/sparc/os/
H A Dbootops.c512 uint32_t arbase, arsize, alloc_size; in bop_free_archive() local
523 prom_getprop(arph, OBP_ALLOCSIZE, (caddr_t)&alloc_size) == -1 || in bop_free_archive()
531 if (alloc_size == 0) in bop_free_archive()
538 MIN(alloc_size, arend - arbase)); in bop_free_archive()
539 arbase += alloc_size; in bop_free_archive()
/onnv-gate/usr/src/uts/common/c2/
H A Daudit_io.c588 size_t alloc_size; in au_doormsg() local
592 alloc_size = AU_DBUF_HEADER + sizeof (uint32_t); in au_doormsg()
593 buf = kmem_alloc(alloc_size, KM_SLEEP); in au_doormsg()
598 alloc_size = AU_DBUF_HEADER; in au_doormsg()
599 buf = kmem_alloc(alloc_size, KM_SLEEP); in au_doormsg()
608 kmem_free(buf, alloc_size); in au_doormsg()
/onnv-gate/usr/src/lib/libmalloc/common/
H A Dmalloc.c203 size_t alloc_size; in memalign() local
214 alloc_size = size + alignment; in memalign()
215 if (alloc_size < size) { /* overflow */ in memalign()
220 alloc_buf = malloc_unlocked(alloc_size, 1); in memalign()
240 alloc_size = size + alignment*2; in memalign()
241 if (alloc_size < size) { in memalign()
246 alloc_buf = malloc_unlocked(alloc_size, 1); in memalign()
/onnv-gate/usr/src/uts/common/io/fcoe/
H A Dfcoe_fc.c277 uint32_t alloc_size; in fcoe_allocate_frame() local
297 alloc_size = sizeof (fcoe_frame_t) + sizeof (fcoe_i_frame_t) + in fcoe_allocate_frame()
303 frm = (fcoe_frame_t *)kmem_alloc(alloc_size, KM_SLEEP); in fcoe_allocate_frame()
304 frm->frm_alloc_size = alloc_size; in fcoe_allocate_frame()
/onnv-gate/usr/src/common/smbclnt/
H A Dsmbfs_ntacl.c194 uint16_t alloc_size; in md_get_ace() local
217 alloc_size = sizeof (i_ntace_v2_t); in md_get_ace()
218 if ((ace = MALLOC(alloc_size)) == NULL) in md_get_ace()
220 bzero(ace, alloc_size); in md_get_ace()
224 ace->ace_hdr.ace_size = alloc_size; in md_get_ace()
1348 uint16_t alloc_size; in zace2ntace() local
1382 alloc_size = sizeof (i_ntace_v2_t); in zace2ntace()
1383 if ((ntace = MALLOC(alloc_size)) == NULL) { in zace2ntace()
1387 bzero(ntace, alloc_size); in zace2ntace()
1391 ntace->ace_hdr.ace_size = alloc_size; in zace2ntace()
/onnv-gate/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/
H A Dpiclsmc.c267 int ret, encode_type = 0x0, len, length, extra_bytes, alloc_size; in read_bd_fields() local
299 alloc_size = ((length/3) * 4) + extra_bytes; in read_bd_fields()
300 store = (uint8_t *)malloc(sizeof (uint8_t) * alloc_size); in read_bd_fields()
309 alloc_size = len * 2; in read_bd_fields()
310 store = (uint8_t *)malloc(sizeof (uint8_t) * alloc_size); in read_bd_fields()
324 (void) memcpy(field, store, alloc_size); in read_bd_fields()
/onnv-gate/usr/src/uts/common/fs/smbsrv/
H A Dsmb_open_andx.c445 uint32_t alloc_size; in smb_com_trans2_open2() local
454 &creation_time, &op->ofun, &alloc_size, &op->fqi.fq_path.pn_path); in smb_com_trans2_open2()
463 op->dsize = alloc_size; in smb_com_trans2_open2()
/onnv-gate/usr/src/uts/i86pc/os/cpupm/
H A Dcpu_acpi.c690 size_t alloc_size; in cpu_acpi_cache_cst() local
744 alloc_size = CPU_ACPI_CSTATES_SIZE(cnt); in cpu_acpi_cache_cst()
746 CPU_ACPI_CSTATES(handle) = kmem_zalloc(alloc_size, KM_SLEEP); in cpu_acpi_cache_cst()
798 kmem_free(CPU_ACPI_CSTATES(handle), alloc_size); in cpu_acpi_cache_cst()
807 kmem_free(CPU_ACPI_CSTATES(handle), alloc_size); in cpu_acpi_cache_cst()
821 kmem_free(orig, alloc_size); in cpu_acpi_cache_cst()
/onnv-gate/usr/src/uts/common/sys/
H A Dkmem.h58 extern void *kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags);
/onnv-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, NULL); 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.c392 int i, alloc_size; in hxge_init_param() local
412 alloc_size = alloc_count * sizeof (uint64_t); in hxge_init_param()
415 (uint64_t)(uint32_t)KMEM_ZALLOC(alloc_size, in hxge_init_param()
418 (uint64_t)(uint32_t)KMEM_ZALLOC(alloc_size, in hxge_init_param()
422 (uint64_t)KMEM_ZALLOC(alloc_size, KM_SLEEP); in hxge_init_param()
424 (uint64_t)KMEM_ZALLOC(alloc_size, KM_SLEEP); in hxge_init_param()
/onnv-gate/usr/src/lib/libsasl/plugin/
H A Dplugin_common.c616 int alloc_size; local
630 alloc_size = sizeof(sasl_interact_t)*num;
631 prompts = utils->malloc(alloc_size);
636 memset(prompts, 0, alloc_size);
/onnv-gate/usr/src/uts/common/fs/tmpfs/
H A Dtmp_dir.c907 size_t namelen, alloc_size; in tdiraddentry() local
927 alloc_size = namelen + sizeof (struct tdirent); in tdiraddentry()
928 tdp = tmp_memalloc(alloc_size, 0); in tdiraddentry()
935 dir->tn_size += alloc_size; in tdiraddentry()
/onnv-gate/usr/src/uts/common/crypto/core/
H A Dkcf_cryptoadm.c189 uint_t alloc_size; in kcf_soft_config_init() local
194 alloc_size = mech_count * CRYPTO_MAX_MECH_NAME; in kcf_soft_config_init()
195 mechsp = kmem_alloc(alloc_size, KM_SLEEP); in kcf_soft_config_init()
196 bcopy(p->mechs, mechsp, alloc_size); in kcf_soft_config_init()
/onnv-gate/usr/src/uts/common/fs/dev/
H A Dsdev_zvolops.c114 devzvol_handle_ioctl(int cmd, zfs_cmd_t *zc, size_t *alloc_size) in devzvol_handle_ioctl() argument
148 if (alloc_size == NULL) in devzvol_handle_ioctl()
151 *alloc_size = size; in devzvol_handle_ioctl()
/onnv-gate/usr/src/cmd/mdb/common/modules/mpt_sas/
H A Dmpt_sas.c232 hash_traverse(mptsas_hash_table_t *hashtab, int pos, int alloc_size) in hash_traverse() argument
267 ret = mdb_alloc(alloc_size, UM_SLEEP); in hash_traverse()
268 if (mdb_vread(ret, alloc_size, (uintptr_t)h.data) == -1) { in hash_traverse()
/onnv-gate/usr/src/uts/sun4/os/
H A Dstartup.c790 size_t alloc_size, alignsize; in alloc_kmem64() local
805 alloc_size = aligned_end - base; in alloc_kmem64()
807 if (prom_allocate_phys(alloc_size, alignsize, &pa) == 0) { in alloc_kmem64()
808 if (prom_claim_virt(alloc_size, base) != (caddr_t)-1) { in alloc_kmem64()
814 prom_free_phys(alloc_size, pa); in alloc_kmem64()
818 if (prom_alloc(base, alloc_size, alignsize) == base) { in alloc_kmem64()
/onnv-gate/usr/src/uts/common/io/lvm/md/
H A Dmd_names.c258 size_t alloc_size; in create_record() local
276 alloc_size = ((shared & NM_SHARED) ? in create_record()
285 alloc_size = NM_ALLOC_SIZE; in create_record()
290 new_id = mddb_createrec((size_t)alloc_size, rec_type, 1, in create_record()
303 ((struct nm_rec_hdr *)new_nh->nmn_record)->r_alloc_size = alloc_size; in create_record()
328 size_t alloc_size; in expand_record() local
338 alloc_size = ((shared & NM_SHARED) ? in expand_record()
342 alloc_size = NM_ALLOC_SIZE; in expand_record()
345 new_id = mddb_createrec((size_t)rh->r_alloc_size + alloc_size, rec_type, in expand_record()
377 new_rh->r_alloc_size += alloc_size; in expand_record()
/onnv-gate/usr/src/lib/lvm/libmeta/common/
H A Dmeta_med.c293 size_t alloc_size = 0; in setup_med_transtab() local
308 alloc_size = (sizeof (mddb_med_t_parm_t) - sizeof (mddb_med_t_ent_t)) + in setup_med_transtab()
311 if ((tp = Realloc(tp, alloc_size)) == NULL) { in setup_med_transtab()
/onnv-gate/usr/src/uts/common/io/comstar/stmf/
H A Dlun_map.c291 uint32_t alloc_size, data_size; in stmf_session_prepare_report_lun_data() local
300 alloc_size = data_size + sizeof (stmf_xfer_data_t) - 4; in stmf_session_prepare_report_lun_data()
302 xd = (stmf_xfer_data_t *)kmem_zalloc(alloc_size, KM_NOSLEEP); in stmf_session_prepare_report_lun_data()
307 xd->alloc_size = alloc_size; in stmf_session_prepare_report_lun_data()
H A Dstmf_impl.h387 uint32_t alloc_size; /* Including this struct */ member
/onnv-gate/usr/src/common/nvpair/
H A Dnvpair.c2360 size_t alloc_size; in nvlist_xpack() local
2385 if (err = nvlist_size(nvl, &alloc_size, encoding)) in nvlist_xpack()
2388 if ((buf = nv_mem_zalloc(&nvpriv, alloc_size)) == NULL) in nvlist_xpack()
2391 if ((err = nvlist_common(nvl, buf, &alloc_size, encoding, in nvlist_xpack()
2393 nv_mem_free(&nvpriv, buf, alloc_size); in nvlist_xpack()
2395 *buflen = alloc_size; in nvlist_xpack()

12