Home
last modified time | relevance | path

Searched refs:allocsize (Results 1 – 25 of 26) sorted by relevance

12

/netbsd-src/sys/dev/pud/
H A Dpud_dev.c65 size_t dlen, allocsize; in doioctl() local
69 allocsize = sizeof(struct pud_req_ioctl) + dlen; in doioctl()
70 pc_ioctl = kmem_zalloc(allocsize, KM_SLEEP); in doioctl()
77 error = pud_request(dev, pc_ioctl, allocsize, class, type); in doioctl()
84 kmem_free(pc_ioctl, allocsize); in doioctl()
130 size_t allocsize; in pud_bdev_strategy() local
133 allocsize = sizeof(struct pud_req_readwrite) + bp->b_bcount; in pud_bdev_strategy()
134 pc_rw = kmem_zalloc(allocsize, KM_SLEEP); in pud_bdev_strategy()
142 error = pud_request(bp->b_dev, pc_rw, allocsize, PUD_REQ_BDEV, in pud_bdev_strategy()
158 kmem_free(pc_rw, allocsize); in pud_bdev_strategy()
[all …]
/netbsd-src/sys/kern/
H A Dkern_malloc.c112 size_t allocsize, hdroffset; in kern_malloc() local
120 allocsize = ULONG_MAX; /* this will fail later */ in kern_malloc()
122 allocsize = PAGE_SIZE + size; /* for page alignment */ in kern_malloc()
125 allocsize = sizeof(struct malloc_header) + size; in kern_malloc()
129 p = kmem_intr_alloc(allocsize, kmflags); in kern_malloc()
133 kmsan_mark(p, allocsize, KMSAN_STATE_UNINIT); in kern_malloc()
134 kmsan_orig(p, allocsize, KMSAN_TYPE_MALLOC, __RET_ADDR); in kern_malloc()
137 memset(p, 0, allocsize); in kern_malloc()
140 mh->mh_size = allocsize - hdroffset; in kern_malloc()
/netbsd-src/sys/dev/pci/
H A Dif_ntwoc_pci.c555 u_int allocsize; in ntwoc_pci_alloc_dma() local
572 allocsize = bpp * (SCA_BSIZE + sizeof (sca_desc_t)); in ntwoc_pci_alloc_dma()
581 if (allocsize > 16 * 1024 * 1024) in ntwoc_pci_alloc_dma()
586 sc->scu_allocsize = allocsize; in ntwoc_pci_alloc_dma()
592 allocsize, in ntwoc_pci_alloc_dma()
599 NTWO_DPRINTF(("DMA memory allocated: %d bytes\n", allocsize)); in ntwoc_pci_alloc_dma()
601 if (bus_dmamem_map(sc->scu_dmat, &sc->scu_seg, 1, allocsize, in ntwoc_pci_alloc_dma()
608 if (bus_dmamap_create(sc->scu_dmat, allocsize, 2, in ntwoc_pci_alloc_dma()
609 allocsize, SCA_DMA_BOUNDARY, in ntwoc_pci_alloc_dma()
617 allocsize, NULL, BUS_DMA_NOWAIT); in ntwoc_pci_alloc_dma()
H A Dvioscsi.c581 size_t allocsize; in vioscsi_alloc_reqs() local
586 allocsize = qsize * sizeof(struct vioscsi_req); in vioscsi_alloc_reqs()
587 r = bus_dmamem_alloc(virtio_dmat(vsc), allocsize, 0, 0, in vioscsi_alloc_reqs()
592 allocsize, r); in vioscsi_alloc_reqs()
596 allocsize, &vaddr, BUS_DMA_NOWAIT); in vioscsi_alloc_reqs()
603 memset(vaddr, 0, allocsize); in vioscsi_alloc_reqs()
661 bus_dmamem_unmap(virtio_dmat(vsc), vaddr, allocsize); in vioscsi_alloc_reqs()
H A Dld_virtio.c176 int allocsize, r, rsegs, i; in ld_virtio_alloc_reqs() local
180 allocsize = sizeof(struct virtio_blk_req) * qsize; in ld_virtio_alloc_reqs()
181 r = bus_dmamem_alloc(virtio_dmat(sc->sc_virtio), allocsize, 0, 0, in ld_virtio_alloc_reqs()
186 "error code %d\n", allocsize, r); in ld_virtio_alloc_reqs()
190 &sc->sc_reqs_seg, 1, allocsize, in ld_virtio_alloc_reqs()
199 memset(vaddr, 0, allocsize); in ld_virtio_alloc_reqs()
255 bus_dmamem_unmap(virtio_dmat(sc->sc_virtio), sc->sc_reqs, allocsize); in ld_virtio_alloc_reqs()
H A Dvirtio.c787 bus_size_t allocsize = 0, size_desc_avail; in virtio_alloc_vq() local
814 allocsize = size_desc_avail + size_used + size_indirect; in virtio_alloc_vq()
817 r = bus_dmamem_alloc(sc->sc_dmat, allocsize, VIRTIO_PAGE_SIZE, 0, in virtio_alloc_vq()
826 r = bus_dmamem_map(sc->sc_dmat, &vq->vq_segs[0], rsegs, allocsize, in virtio_alloc_vq()
835 r = bus_dmamap_create(sc->sc_dmat, allocsize, 1, allocsize, 0, in virtio_alloc_vq()
845 vq->vq_vaddr, allocsize, NULL, BUS_DMA_WAITOK); in virtio_alloc_vq()
853 vq->vq_bytesize = allocsize; in virtio_alloc_vq()
887 "size %d\n", allocsize, vq->vq_index, name, vq_num); in virtio_alloc_vq()
900 bus_dmamem_unmap(sc->sc_dmat, vq->vq_vaddr, allocsize); in virtio_alloc_vq()
[all...]
/netbsd-src/sys/dev/virtio/
H A Dviocon.c243 int rxidx, txidx, allocsize, nsegs; in viocon_port_create()
282 allocsize = (vp->vp_rx->vq_num + vp->vp_tx->vq_num) * BUFSIZE; in viocon_port_create()
284 if (bus_dmamap_create(virtio_dmat(vsc), allocsize, 1, allocsize, 0, in viocon_port_create()
287 if (bus_dmamem_alloc(virtio_dmat(vsc), allocsize, 8, 0, &vp->vp_dmaseg, in viocon_port_create()
291 allocsize, &kva, BUS_DMA_NOWAIT) != 0) in viocon_port_create()
293 memset(kva, 0, allocsize); in viocon_port_create()
295 allocsize, NULL, BUS_DMA_NOWAIT) != 0) in viocon_port_create()
242 int rxidx, txidx, allocsize, nsegs; viocon_port_create() local
/netbsd-src/usr.bin/rs/
H A Drs.c86 static int allocsize = BUFSIZ; variable
381 allocsize += allocsize; in getptrs()
383 p = (char **)realloc(elem, allocsize * sizeof(char *)); in getptrs()
388 endelem = (elem = p) + allocsize; in getptrs()
/netbsd-src/external/apache2/llvm/dist/llvm/examples/BrainF/
H A DBrainF.cpp95 Constant* allocsize = ConstantExpr::getSizeOf(Int8Ty); in header() local
96 allocsize = ConstantExpr::getTruncOrBitCast(allocsize, IntPtrTy); in header()
97 ptr_arr = CallInst::CreateMalloc(BB, IntPtrTy, Int8Ty, allocsize, val_mem, in header()
/netbsd-src/sbin/restore/
H A Dsymtab.c380 #define allocsize(size) (((size) + 1 + STRTBLINCR - 1) & ~(STRTBLINCR - 1)) macro
382 static struct strhdr strtblhdr[allocsize(NAME_MAX) / STRTBLINCR];
403 for (siz = allocsize(len), ep = (cp + pagesize) - siz; in savename()
476 (int)allocsize(ep->e_namlen), fd); in dumpsymtable()
488 stroff += allocsize(ep->e_namlen); in dumpsymtable()
/netbsd-src/sys/rump/dev/lib/libpci/
H A Drumpdev_bus_dma.c467 size_t allocsize = nsegs * sizeof(*dss); in bus_dmamem_map() local
475 dss = kmem_alloc(allocsize, KM_SLEEP); in bus_dmamem_map()
482 kmem_free(dss, allocsize); in bus_dmamem_map()
/netbsd-src/external/gpl3/gcc.old/dist/libphobos/libdruntime/rt/
H A Dlifetime.d1027 auto allocsize = (void[]).sizeof * dim;
1028 auto info = __arrayAlloc(allocsize, ti, tinext);
1030 __setArrayAllocLength(info, allocsize, isshared, tinext);
2212 auto allocsize = length * size;
2213 auto info = __arrayAlloc(allocsize, ti, tinext);
2215 __setArrayAllocLength(info, allocsize, isshared, tinext);
2250 auto allocsize = length * sizeelem;
2251 auto info = __arrayAlloc(allocsize, ti, tinext);
2253 __setArrayAllocLength(info, allocsize, isshared, tinext);
/netbsd-src/external/gpl3/gcc/dist/libphobos/libdruntime/rt/
H A Dlifetime.d1055 auto allocsize = (void[]).sizeof * dim;
1056 auto info = __arrayAlloc(allocsize, ti, tinext);
1058 __setArrayAllocLength(info, allocsize, isshared, tinext);
2279 auto allocsize = length * size;
2280 auto info = __arrayAlloc(allocsize, ti, tinext);
2282 __setArrayAllocLength(info, allocsize, isshared, tinext);
2317 auto allocsize = length * sizeelem;
2318 auto info = __arrayAlloc(allocsize, ti, tinext);
2320 __setArrayAllocLength(info, allocsize, isshared, tinext);
/netbsd-src/sbin/fsck_lfs/
H A Dsegwrite.c936 size_t allocsize; in lfs_seglock() local
946 allocsize = lfs_sb_getssize(fs) * sizeof(struct ubuf *); in lfs_seglock()
947 sp->bpp = emalloc(allocsize); in lfs_seglock()
949 err(!preen, "Could not allocate %zu bytes", allocsize); in lfs_seglock()
/netbsd-src/external/mpl/dhcp/bind/dist/lib/isc/
H A Dpk11.c55 static int32_t allocsize = 0; variable
186 allocsize -= (int)size; in pk11_mem_put()
202 if ((mctx != NULL) && (pk11_mctx == NULL) && (allocsize == 0)) { in pk11_initialize()
/netbsd-src/external/gpl3/binutils/dist/bfd/
H A Darchive.c516 bfd_size_type allocsize = sizeof (struct areltdata) + sizeof (struct ar_hdr); in _bfd_generic_read_ar_hdr_mag() local
567 || namelen > -allocsize - 2 in _bfd_generic_read_ar_hdr_mag()
573 allocsize += namelen + 1; in _bfd_generic_read_ar_hdr_mag()
577 allocptr = (char *) bfd_malloc (allocsize); in _bfd_generic_read_ar_hdr_mag()
616 allocsize += namelen + 1; in _bfd_generic_read_ar_hdr_mag()
621 allocptr = (char *) bfd_malloc (allocsize); in _bfd_generic_read_ar_hdr_mag()
/netbsd-src/external/gpl3/binutils.old/dist/bfd/
H A Darchive.c496 bfd_size_type allocsize = sizeof (struct areltdata) + sizeof (struct ar_hdr); in _bfd_generic_read_ar_hdr_mag() local
547 || namelen > -allocsize - 2 in _bfd_generic_read_ar_hdr_mag()
553 allocsize += namelen + 1; in _bfd_generic_read_ar_hdr_mag()
557 allocptr = (char *) bfd_malloc (allocsize); in _bfd_generic_read_ar_hdr_mag()
596 allocsize += namelen + 1; in _bfd_generic_read_ar_hdr_mag()
601 allocptr = (char *) bfd_malloc (allocsize); in _bfd_generic_read_ar_hdr_mag()
/netbsd-src/external/apache2/llvm/dist/llvm/utils/vim/syntax/
H A Dllvm.vim47 \ allocsize
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/IR/
H A DAttributes.td39 def AllocSize : IntAttr<"allocsize">;
/netbsd-src/external/apache2/llvm/dist/llvm/lib/AsmParser/
H A DLLLexer.cpp638 KEYWORD(allocsize); in LexIdentifier()
/netbsd-src/external/gpl3/gcc.old/dist/gcc/
H A Dfunction.c2964 rtx allocsize = gen_int_mode (size_stored, Pmode); in assign_parm_setup_block() local
2965 get_dynamic_stack_size (&allocsize, 0, DECL_ALIGN (parm), NULL); in assign_parm_setup_block()
2966 stack_parm = assign_stack_local (BLKmode, UINTVAL (allocsize), in assign_parm_setup_block()
H A Dvar-tracking.c8097 size_t allocsize; in loc_exp_dep_alloc() local
8115 allocsize = offsetof (struct onepart_aux, deps) in loc_exp_dep_alloc()
8121 VAR_LOC_1PAUX (var), allocsize); in loc_exp_dep_alloc()
8130 VAR_LOC_1PAUX (var) = XNEWVAR (struct onepart_aux, allocsize); in loc_exp_dep_alloc()
/netbsd-src/external/apache2/llvm/dist/llvm/docs/
H A DBitCodeFormat.rst1055 * code 51: ``allocsize(<EltSizeParam>[, <NumEltsParam>])``
1078 The ``allocsize`` attribute has a special encoding for its arguments. Its two
/netbsd-src/external/gpl3/gcc/dist/gcc/
H A Dvar-tracking.cc8128 size_t allocsize; in loc_exp_dep_alloc() local
8146 allocsize = offsetof (struct onepart_aux, deps) in loc_exp_dep_alloc()
8152 VAR_LOC_1PAUX (var), allocsize); in loc_exp_dep_alloc()
8161 VAR_LOC_1PAUX (var) = XNEWVAR (struct onepart_aux, allocsize); in loc_exp_dep_alloc()
/netbsd-src/external/mit/expat/dist/lib/
H A Dxmlparse.c7361 const size_t allocsize = (dtd->scaffCount * sizeof(XML_Content) in build_model() local
7364 ret = (XML_Content *)MALLOC(parser, allocsize); in build_model()

12