/openbsd-src/sys/kern/ |
H A D | sysv_sem.c | 67 sema = mallocarray(seminfo.semmni, sizeof(struct semid_ds *), in seminit() 69 semseqs = mallocarray(seminfo.semmni, sizeof(unsigned short), in seminit() 325 semval = mallocarray(nsems, sizeof(arg.array[0]), in sys___semctl() 367 semval = mallocarray(nsems, sizeof(arg.array[0]), in sys___semctl() 437 semaptr_new->sem_base = mallocarray(nsems, sizeof(struct sem), in sys_semget() 564 sops = mallocarray(nsops, sizeof(struct sembuf), M_SEM, M_WAITOK); in sys_semop() 859 sema_new = mallocarray(val, sizeof(struct semid_ds *), in sema_reallocate() 863 newseqs = mallocarray(val, sizeof(unsigned short), M_SEM, in sema_reallocate()
|
H A D | kern_intrmap.c | 102 cpumap = mallocarray(ncpus, sizeof(*cpumap), in intrmap_cpus_get() 115 struct cpu_info **icpumap = mallocarray(icpus, in intrmap_cpus_get() 192 im->im_cpumap = mallocarray(nintrs, sizeof(*im->im_cpumap), M_DEVBUF, in intrmap_create()
|
H A D | sysv_shm.c | 541 shmsegs = mallocarray(shminfo.shmmni, sizeof(struct shmid_ds *), in shminit() 543 shmseqs = mallocarray(shminfo.shmmni, sizeof(unsigned short), in shminit() 559 newsegs = mallocarray(val, sizeof(struct shmid_ds *), in shm_reallocate() 566 newseqs = mallocarray(val, sizeof(unsigned short), M_SHM, in shm_reallocate()
|
H A D | kern_descrip.c | 931 newofile = mallocarray(nfiles, OFILESIZE, M_FILEDESC, M_WAITOK); in fdexpand() 937 newhimap = mallocarray(NDHISLOTS(nfiles), sizeof(u_int), in fdexpand() 939 newlomap = mallocarray(NDLOSLOTS(nfiles), sizeof(u_int), in fdexpand() 1124 newfdp->fd_ofiles = mallocarray(i, OFILESIZE, M_FILEDESC, in fdcopy() 1130 newfdp->fd_himap = mallocarray(NDHISLOTS(newfdp->fd_nfiles), in fdcopy() 1132 newfdp->fd_lomap = mallocarray(NDLOSLOTS(newfdp->fd_nfiles), in fdcopy()
|
/openbsd-src/sys/crypto/ |
H A D | crypto.c | 232 crypto_drivers = mallocarray(crypto_drivers_num, in crypto_get_driverid() 258 newdrv = mallocarray(crypto_drivers_num, in crypto_get_driverid() 472 crp->crp_desc = mallocarray(num, sizeof(struct cryptodesc), in crypto_getreq()
|
/openbsd-src/sys/arch/amd64/amd64/ |
H A D | est.c | 254 if ((acpilist->table = mallocarray(nstates, sizeof(struct est_op), in est_acpi_init() 305 if ((acpilist->table = mallocarray(npss, sizeof(struct est_op), in est_acpi_pss_changed() 409 if ((fake_table = mallocarray(3, sizeof(struct est_op), in est_init()
|
/openbsd-src/sys/lib/libz/ |
H A D | zopenbsd.c | 28 return mallocarray(items, size, M_DEVBUF, M_NOWAIT); in zcalloc()
|
/openbsd-src/sys/dev/dt/ |
H A D | dt_prov_syscall.c | 56 dtps_entry = mallocarray(dtps_nsysent, sizeof(dtp), M_DT, in dt_prov_syscall_init() 60 dtps_return = mallocarray(dtps_nsysent, sizeof(dtp), M_DT, in dt_prov_syscall_init()
|
/openbsd-src/sys/net/ |
H A D | if_enc.c | 121 if ((new = mallocarray(unit + 1, sizeof(struct ifnet *), in enc_clone_create() 262 if ((new = mallocarray(rdomain + 1, sizeof(struct ifnet *), in enc_setif()
|
/openbsd-src/sys/arch/powerpc64/dev/ |
H A D | kexec.c | 113 ph = mallocarray(eh.e_phnum, sizeof(Elf_Phdr), M_TEMP, M_NOWAIT); in kexec_kexec() 124 sh = mallocarray(eh.e_shnum, sizeof(Elf_Shdr), M_TEMP, M_NOWAIT); in kexec_kexec()
|
/openbsd-src/sys/dev/acpi/ |
H A D | dwgpio.c | 138 sc->sc_pin_ih = mallocarray(sc->sc_npins, sizeof(*sc->sc_pin_ih), in dwgpio_attach() 144 sc->sc_ih = mallocarray(sc->sc_nirq, sizeof(*sc->sc_ih), in dwgpio_attach()
|
H A D | acpige.c | 87 sc->sc_irq = mallocarray(aaa->aaa_nirq, sizeof(struct acpige_irq), in acpige_attach()
|
H A D | amdgpio.c | 152 sc->sc_pin_cfg = mallocarray(sc->sc_npins, sizeof(*sc->sc_pin_cfg), in amdgpio_attach() 154 sc->sc_pin_ih = mallocarray(sc->sc_npins, sizeof(*sc->sc_pin_ih), in amdgpio_attach()
|
/openbsd-src/sys/dev/fdt/ |
H A D | mvicu.c | 132 sc->sc_nodes = mallocarray(1, sizeof(*sc->sc_nodes), in mvicu_attach() 139 sc->sc_nodes = mallocarray(nchildren, sizeof(*sc->sc_nodes), in mvicu_attach()
|
H A D | imxgpc.c | 92 sc->sc_pd = mallocarray(sc->sc_npd, sizeof(*sc->sc_pd), in imxgpc_attach()
|
/openbsd-src/regress/sys/net/rtable/ |
H A D | kern_compat.h | 47 #define mallocarray(nelems, size, bucket, flag) calloc(nelems, size) macro
|
/openbsd-src/sys/netinet/ |
H A D | ip_ipsp.c | 219 tdbh = mallocarray(tdb_hashmask + 1, sizeof(struct tdb *), M_TDB, in ipsp_init() 221 tdbdst = mallocarray(tdb_hashmask + 1, sizeof(struct tdb *), M_TDB, in ipsp_init() 223 tdbsrc = mallocarray(tdb_hashmask + 1, sizeof(struct tdb *), M_TDB, in ipsp_init() 789 new_tdbh = mallocarray(tdb_hashmask + 1, sizeof(struct tdb *), M_TDB, in tdb_rehash() 791 new_tdbdst = mallocarray(tdb_hashmask + 1, sizeof(struct tdb *), M_TDB, in tdb_rehash() 793 new_srcaddr = mallocarray(tdb_hashmask + 1, sizeof(struct tdb *), M_TDB, in tdb_rehash()
|
/openbsd-src/sys/dev/pci/drm/ |
H A D | drm_agpsupport.c | 140 head = mallocarray(1, sizeof(*head), M_DRM, M_NOWAIT | M_ZERO); in drm_legacy_agp_init()
|
/openbsd-src/sys/arch/octeon/dev/ |
H A D | octboot.c | 133 ph = mallocarray(eh.e_phnum, sizeof(Elf_Phdr), M_TEMP, M_NOWAIT); in octboot_kexec() 144 sh = mallocarray(eh.e_shnum, sizeof(Elf_Shdr), M_TEMP, M_NOWAIT); in octboot_kexec()
|
/openbsd-src/sys/arch/alpha/dev/ |
H A D | sgmap_common.c | 151 map->_dm_cookie = mallocarray(nsegments, sizeof(struct extent_region),
|
/openbsd-src/sys/dev/usb/ |
H A D | usb_subr.c | 498 ifc->endpoints = mallocarray(nendpt, sizeof(*ifc->endpoints), in usbd_fill_iface_data() 752 dev->ifaces = mallocarray(nifc, sizeof(*dev->ifaces), M_USB, in usbd_set_config_index() 872 dev->subdevs = mallocarray(2, sizeof dv, M_USB, M_NOWAIT); in usbd_probe_and_attach() 907 ifaces = mallocarray(nifaces, sizeof(*ifaces), M_USB, M_NOWAIT); in usbd_probe_and_attach() 918 dev->subdevs = mallocarray(nifaces + 2, sizeof(dv), M_USB, in usbd_probe_and_attach() 972 dev->subdevs = mallocarray(2, sizeof dv, M_USB, M_NOWAIT); in usbd_probe_and_attach()
|
H A D | upd.c | 195 sc->sc_reports = mallocarray(sc->sc_max_repid, in upd_attach() 199 sc->sc_sensors = mallocarray(UPD_MAX_SENSORS, in upd_attach()
|
/openbsd-src/sys/uvm/ |
H A D | uvm_aobj.c | 459 new_swslots = mallocarray(pages, sizeof(int), M_UVMAOBJ, in uao_shrink_convert() 494 new_swslots = mallocarray(pages, sizeof(int), M_UVMAOBJ, in uao_shrink_array() 549 new_swslots = mallocarray(pages, sizeof(int), M_UVMAOBJ, in uao_grow_array() 726 aobj->u_swslots = mallocarray(pages, sizeof(int), in uao_create()
|
/openbsd-src/sys/dev/wscons/ |
H A D | wsevent.c | 149 queue = mallocarray(WSEVENT_QSIZE, sizeof(struct wscons_event), in wsevent_read()
|
/openbsd-src/sys/sys/ |
H A D | malloc.h | 386 void *mallocarray(size_t, size_t, int, int);
|